src/Chippyash/Type/Number/Rational/GMPRationalType.php
public function get()
    {
        if ($this->isInteger()) {
            /** @noinspection PhpUndefinedMethodInspection */
            return $this->value['num']->get();
        }

        $num = intval(gmp_strval($this->value['num']->gmp()));
        $den = intval(gmp_strval($this->value['den']->gmp()));

        return $num/$den;
    }
public function get()
    {
        if ($this->isInteger()) {
            /** @noinspection PhpUndefinedMethodInspection */
            return $this->value['num']->get();
        }

        $num = intval(gmp_strval($this->value['num']->gmp()));
        $den = intval(gmp_strval($this->value['den']->gmp()));

        return $num/$den;
    }
public function get ( ) { if ( $ this -> isInteger ( ) ) { /** @noinspection PhpUndefinedMethodInspection */ return $ this -> value [ 'num' ] -> get ( ) ; } $ num = intval ( gmp_strval ( $ this -> value [ 'num' ] -> gmp ( ) ) ) ; $ den = intval ( gmp_strval ( $ this -> value [ 'den' ] -> gmp ( ) ) ) ; return $ num / $ den ; }
Get the value of the object typed properly
as a PHP Native type

@return integer|float
Get the value of the object typed properly as a PHP Native type