lib/PhpParser/Node/Scalar/DNumber.php 1 location
|
@@ 51-53 (lines=3) @@
|
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
// bin |
| 51 |
|
if ('b' === $str[1] || 'B' === $str[1]) { |
| 52 |
|
return bindec($str); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
// oct |
| 56 |
|
// substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit (8 or 9) |
lib/PhpParser/Node/Scalar/LNumber.php 1 location
|
@@ 50-52 (lines=3) @@
|
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
// bin |
| 50 |
|
if ('b' === $str[1] || 'B' === $str[1]) { |
| 51 |
|
return bindec($str); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
// oct (intval instead of octdec to get proper cutting behavior with malformed numbers) |
| 55 |
|
return intval($str, 8); |