芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/mctv/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
attributes = $attributes; $this->value = $value; } public function getSubNodeNames() : array { return ['value']; } /** * Constructs an LNumber node from a string number literal. * * @param string $str String number literal (decimal, octal, hex or binary) * @param array $attributes Additional attributes * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) * * @return LNumber The constructed LNumber, including kind attribute */ public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { $str = str_replace('_', '', $str); if ('0' !== $str[0] || '0' === $str) { $attributes['kind'] = LNumber::KIND_DEC; return new LNumber((int) $str, $attributes); } if ('x' === $str[1] || 'X' === $str[1]) { $attributes['kind'] = LNumber::KIND_HEX; return new LNumber(hexdec($str), $attributes); } if ('b' === $str[1] || 'B' === $str[1]) { $attributes['kind'] = LNumber::KIND_BIN; return new LNumber(bindec($str), $attributes); } if (!$allowInvalidOctal && strpbrk($str, '89')) { throw new Error('Invalid numeric literal', $attributes); } // Strip optional explicit octal prefix. if ('o' === $str[1] || 'O' === $str[1]) { $str = substr($str, 2); } // use intval instead of octdec to get proper cutting behavior with malformed numbers $attributes['kind'] = LNumber::KIND_OCT; return new LNumber(intval($str, 8), $attributes); } public function getType() : string { return 'Scalar_LNumber'; } }