protected function _oct()
    {
        if(!$this->_decimal()->zero) {
            throw new \RuntimeException(
                'Cannot get octal numbers from non integer.'
            );
        }

        if($this->value < 0){
            return new S('-' . decoct(abs($this->value)));
        } else {
            return new S(decoct($this->value));
        }

    }
protected function _oct()
    {
        if(!$this->_decimal()->zero) {
            throw new \RuntimeException(
                'Cannot get octal numbers from non integer.'
            );
        }

        if($this->value < 0){
            return new S('-' . decoct(abs($this->value)));
        } else {
            return new S(decoct($this->value));
        }

    }
protected function _oct ( ) { if ( ! $ this -> _decimal ( ) -> zero ) { throw new \ RuntimeException ( 'Cannot get octal numbers from non integer.' ) ; } if ( $ this -> value < 0 ) { return new S ( '-' . decoct ( abs ( $ this -> value ) ) ) ; } else { return new S ( decoct ( $ this -> value ) ) ; } }
Converts to octal number.

Returns current integer number converted to octal as `\Malenki\Bah\S`
object.

Example:

$n = new N(2001);
echo $n->oct; // '3721'

Negative numbers are allowed too:

$n = new N(-2001);
echo $n->oct; // '-3721'


This is runtime part of its associated magic getter.

@see N::$oct Magic getter `N::$oct`
@see N::_o() Alias
@return S
@throws \RuntimeException If current number is not an integer.
Converts to octal number .