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);
    }