REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.03 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
Text
Base64
<?php declare (strict_types=1); namespace PhpParser\Node\Scalar; use PhpParser\Node\Scalar; class DNumber extends Scalar { /** @var float Number value */ public $value; /** * Constructs a float number scalar node. * * @param float $value Value of the number * @param array $attributes Additional attributes */ public function __construct(float $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } public function getSubNodeNames() : array { return ['value']; } /** * @param mixed[] $attributes */ public static function fromString(string $str, array $attributes = []) : \PhpParser\Node\Scalar\DNumber { $attributes['rawValue'] = $str; $float = self::parse($str); return new \PhpParser\Node\Scalar\DNumber($float, $attributes); } /** * @internal * * Parses a DNUMBER token like PHP would. * * @param string $str A string number * * @return float The parsed number */ public static function parse(string $str) : float { $str = \str_replace('_', '', $str); // Check whether this is one of the special integer notations. if ('0' === $str[0]) { // hex if ('x' === $str[1] || 'X' === $str[1]) { return \hexdec($str); } // bin if ('b' === $str[1] || 'B' === $str[1]) { return \bindec($str); } // oct, but only if the string does not contain any of '.eE'. if (\false === \strpbrk($str, '.eE')) { // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit // (8 or 9) so that only the digits before that are used. return \octdec(\substr($str, 0, \strcspn($str, '89'))); } } // dec return (float) $str; } public function getType() : string { return 'Scalar_DNumber'; } }
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).