REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.60 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
Text
Base64
<?php declare (strict_types=1); namespace PhpParser\Node\Scalar; use PhpParser\Error; use PhpParser\Node\Scalar; class LNumber extends Scalar { /* For use in "kind" attribute */ const KIND_BIN = 2; const KIND_OCT = 8; const KIND_DEC = 10; const KIND_HEX = 16; /** @var int Number value */ public $value; /** * Constructs an integer number scalar node. * * @param int $value Value of the number * @param array $attributes Additional attributes */ public function __construct(int $value, array $attributes = []) { $this->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) : \PhpParser\Node\Scalar\LNumber { $attributes['rawValue'] = $str; $str = \str_replace('_', '', $str); if ('0' !== $str[0] || '0' === $str) { $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_DEC; return new \PhpParser\Node\Scalar\LNumber((int) $str, $attributes); } if ('x' === $str[1] || 'X' === $str[1]) { $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_HEX; return new \PhpParser\Node\Scalar\LNumber(\hexdec($str), $attributes); } if ('b' === $str[1] || 'B' === $str[1]) { $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_BIN; return new \PhpParser\Node\Scalar\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'] = \PhpParser\Node\Scalar\LNumber::KIND_OCT; return new \PhpParser\Node\Scalar\LNumber(\intval($str, 8), $attributes); } public function getType() : string { return 'Scalar_LNumber'; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
MagicConst
DIR
-
drwxr-xr-x
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DNumber.php
2.03 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Encapsed.php
705 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EncapsedStringPart.php
726 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LNumber.php
2.60 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MagicConst.php
595 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
String_.php
4.34 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).