lib/PhpParser/Node/Scalar/DNumber.php 1 location
|
@@ 46-48 (lines=3) @@
|
| 43 |
|
// if it starts with 0 it's one of the special integer notations |
| 44 |
|
if ('0' === $str[0]) { |
| 45 |
|
// hex |
| 46 |
|
if ('x' === $str[1] || 'X' === $str[1]) { |
| 47 |
|
return hexdec($str); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
// bin |
| 51 |
|
if ('b' === $str[1] || 'B' === $str[1]) { |
lib/PhpParser/Node/Scalar/LNumber.php 1 location
|
@@ 45-47 (lines=3) @@
|
| 42 |
|
// if first char is 0 (and number isn't 0) it's a special syntax |
| 43 |
|
if ('0' === $str[0]) { |
| 44 |
|
// hex |
| 45 |
|
if ('x' === $str[1] || 'X' === $str[1]) { |
| 46 |
|
return hexdec($str); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
// bin |
| 50 |
|
if ('b' === $str[1] || 'B' === $str[1]) { |
lib/PhpParser/Node/Scalar/String_.php 1 location
|
@@ 96-98 (lines=3) @@
|
| 93 |
|
|
| 94 |
|
if (isset(self::$replacements[$str])) { |
| 95 |
|
return self::$replacements[$str]; |
| 96 |
|
} elseif ('x' === $str[0] || 'X' === $str[0]) { |
| 97 |
|
return chr(hexdec($str)); |
| 98 |
|
} elseif ('u' === $str[0]) { |
| 99 |
|
return self::codePointToUtf8(hexdec($matches[2])); |
| 100 |
|
} else { |
| 101 |
|
return chr(octdec($str)); |