public function intVal(): int
    {
        if (!isset($this->_intNum)) {
            $num = gmp_init($this->_num, 10);
            if (gmp_cmp($num, $this->_intMaxGmp()) > 0) {
                throw new \RuntimeException("Integer overflow.");
            }
            if (gmp_cmp($num, $this->_intMinGmp()) < 0) {
                throw new \RuntimeException("Integer underflow.");
            }
            $this->_intNum = gmp_intval($num);
        }
        return $this->_intNum;
    }
public function intVal(): int
    {
        if (!isset($this->_intNum)) {
            $num = gmp_init($this->_num, 10);
            if (gmp_cmp($num, $this->_intMaxGmp()) > 0) {
                throw new \RuntimeException("Integer overflow.");
            }
            if (gmp_cmp($num, $this->_intMinGmp()) < 0) {
                throw new \RuntimeException("Integer underflow.");
            }
            $this->_intNum = gmp_intval($num);
        }
        return $this->_intNum;
    }
public function intVal ( ) : int { if ( ! isset ( $ this -> _intNum ) ) { $ num = gmp_init ( $ this -> _num , 10 ) ; if ( gmp_cmp ( $ num , $ this -> _intMaxGmp ( ) ) > 0 ) { throw new \ RuntimeException ( "Integer overflow." ) ; } if ( gmp_cmp ( $ num , $ this -> _intMinGmp ( ) ) < 0 ) { throw new \ RuntimeException ( "Integer underflow." ) ; } $ this -> _intNum = gmp_intval ( $ num ) ; } return $ this -> _intNum ; }
Get the number as an integer.

@throws \RuntimeException If number overflows integer size
@return int
Get the number as an integer .