public static function getNumberBaseFromString($value)
    {
        if (substr($value, 0, 1) == 'b')
            return self::BINARY;

        if (substr($value, 0, 1) == 'o')
            return self::OCTAL;

        if (substr($value, 0, 2) == '0x')
            return self::HEXADECIMAL;

        if (is_numeric($value))
            return self::DECIMAL;

        throw new \Exception ("not a number ".$value);
    }
public static function getNumberBaseFromString($value)
    {
        if (substr($value, 0, 1) == 'b')
            return self::BINARY;

        if (substr($value, 0, 1) == 'o')
            return self::OCTAL;

        if (substr($value, 0, 2) == '0x')
            return self::HEXADECIMAL;

        if (is_numeric($value))
            return self::DECIMAL;

        throw new \Exception ("not a number ".$value);
    }
public static function getNumberBaseFromString ( $ value ) { if ( substr ( $ value , 0 , 1 ) == 'b' ) return self :: BINARY ; if ( substr ( $ value , 0 , 1 ) == 'o' ) return self :: OCTAL ; if ( substr ( $ value , 0 , 2 ) == '0x' ) return self :: HEXADECIMAL ; if ( is_numeric ( $ value ) ) return self :: DECIMAL ; throw new \ Exception ( "not a number " . $ value ) ; }
Recognize current number base of string
@param string $value
@return int
@throws \Exception
Recognize current number base of string