Home
last modified time | relevance | path

Searched refs:str (Results 1 – 12 of 12) sorted by relevance

/PHP-Parser/lib/PhpParser/Node/Scalar/
H A DFloat_.php30 $attributes['rawValue'] = $str;
31 $float = self::parse($str);
41 * @param string $str A string number
46 $str = str_replace('_', '', $str);
49 if ('0' === $str[0]) {
51 if ('x' === $str[1] || 'X' === $str[1]) {
52 return hexdec($str);
56 if ('b' === $str[1] || 'B' === $str[1]) {
57 return bindec($str);
64 return octdec(substr($str, 0, strcspn($str, '89')));
[all …]
H A DInt_.php43 $attributes['rawValue'] = $str;
45 $str = str_replace('_', '', $str);
47 if ('0' !== $str[0] || '0' === $str) {
49 return new Int_((int) $str, $attributes);
52 if ('x' === $str[1] || 'X' === $str[1]) {
54 return new Int_(hexdec($str), $attributes);
57 if ('b' === $str[1] || 'B' === $str[1]) {
59 return new Int_(bindec($str), $attributes);
67 if ('o' === $str[1] || 'O' === $str[1]) {
68 $str = substr($str, 2);
[all …]
H A DString_.php50 …$attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B')…
54 $attributes['rawValue'] = $str;
66 * @param string $str String token content
73 if ('b' === $str[0] || 'B' === $str[0]) {
77 if ('\'' === $str[$bLength]) {
81 substr($str, $bLength + 1, -1)
103 $str = str_replace('\\' . $quote, $quote, $str);
114 $str = $matches[1];
119 if ('x' === $str[0] || 'X' === $str[0]) {
122 if ('u' === $str[0]) {
[all …]
/PHP-Parser/test/
H A Dbootstrap.php7 function canonicalize($str) { argument
9 $str = str_replace("\r\n", "\n", $str);
12 $str = rtrim($str, "\n");
15 $lines = explode("\n", $str);
/PHP-Parser/lib/PhpParser/Lexer/TokenEmulator/
H A DExplicitOctalEmulator.php34 private function resolveIntegerOrFloatToken(string $str): int { argument
35 $str = substr($str, 1);
36 $str = str_replace('_', '', $str);
37 $num = octdec($str);
/PHP-Parser/test/code/prettyPrinter/expr/
H A Dintrinsics.test16 eval('str');
29 eval('str');
/PHP-Parser/test/code/parser/expr/uvs/
H A Disset.test7 isset("str"->a);
77 value: str
/PHP-Parser/lib/PhpParser/
H A DComment.php175 * @param string $str String to check
178 private function getShortestWhitespacePrefixLen(string $str): int { argument
179 $lines = explode("\n", $str);
H A DPrettyPrinterAbstract.php327 protected function handleMagicTokens(string $str): string { argument
330 $str = str_replace(
333 $str);
334 $str = str_replace($this->docStringEndToken, $this->newline, $str);
337 return $str;
1119 protected function safeAppend(string &$str, string $append): void { argument
1120 if ($str === "") {
1121 $str = $append;
1130 || !$this->labelCharMap[$str[\strlen($str) - 1]]) {
1131 $str .= $append;
[all …]
H A DConstExprEvaluator.php67 set_error_handler(function ($num, $str, $file, $line) {
68 throw new \ErrorException($str, 0, $num, $file, $line);
H A DParserAbstract.php738 …protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): … argument
740 return Int_::fromString($str, $attributes, $allowInvalidOctal);
751 * @param string $str Number string
756 protected function parseNumString(string $str, array $attributes) { argument
757 if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) {
758 return new String_($str, $attributes);
761 $num = +$str;
763 return new String_($str, $attributes);
/PHP-Parser/lib/PhpParser/PrettyPrinter/
H A DStandard.php135 private function indentString(string $str): string { argument
136 return str_replace("\n", $this->nl, $str);
213 $str = (string) -$node->value;
216 $str = (string) $node->value;
220 return $sign . '0b' . base_convert($str, 10, 2);
222 return $sign . '0' . base_convert($str, 10, 8);
224 return $sign . '0x' . base_convert($str, 10, 16);

Completed in 27 milliseconds