/PHP-Parser/test_old/ |
H A D | run.php | 50 $phpVersion = $options['--php-version'] ?? '8.0'; variable 130 $lexer = new PhpParser\Lexer\Emulative(\PhpParser\PhpVersion::fromString($phpVersion)); 131 if (version_compare($phpVersion, '7.0', '>=')) {
|
/PHP-Parser/lib/PhpParser/Lexer/ |
H A D | Emulative.php | 36 * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. 38 public function __construct(?PhpVersion $phpVersion = null) { argument 39 $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported();
|
/PHP-Parser/test/PhpParser/Lexer/ |
H A D | EmulativeTest.php | 399 … public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens): void { argument 400 $lexer = new Emulative(PhpVersion::fromString($phpVersion));
|
/PHP-Parser/doc/component/ |
H A D | Pretty_printing.markdown | 37 * `phpVersion` (defaults to 7.4) allows opting into formatting that is not supported by older PHP 41 a legacy option, and `phpVersion` should be used to control this behavior instead. 43 The behaviors controlled by `phpVersion` (defaults to PHP 7.4) are:
|
/PHP-Parser/lib/PhpParser/ |
H A D | ParserAbstract.php | 41 protected PhpVersion $phpVersion; variable in PhpParser\\ParserAbstract 148 * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This 154 public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { argument 156 $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); 706 if (!$this->phpVersion->supportsBuiltinType($lowerName)) {
|
H A D | PrettyPrinterAbstract.php | 120 protected PhpVersion $phpVersion; variable in PhpParser\\PrettyPrinterAbstract 181 $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); 189 $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); 191 $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); 1256 if ($this->phpVersion->allowsDelInIdentifiers()) {
|
/PHP-Parser/lib/PhpParser/PrettyPrinter/ |
H A D | Standard.php | 140 $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); 160 $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; 179 $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; 567 …$this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_L… 654 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… 686 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… 733 if (!$this->phpVersion->supportsYieldWithoutParentheses()) { 842 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… 860 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… 1065 if ($this->phpVersion->supportsFlexibleHeredoc()) {
|
/PHP-Parser/grammar/ |
H A D | php.y | 956 if (!$this->phpVersion->allowsAssignNewByReference()) { 1149 { $$ = array($1); parseEncapsed($$, '`', $this->phpVersion->supportsUnicodeEscapes()); } 1150 … { parseEncapsed($1, '`', $this->phpVersion->supportsUnicode… 1194 …{ $$ = Scalar\String_::fromString($1, attributes(), $this->phpVersion->supportsUnicodeEscapes()); } 1197 …parseEncapsed($2, '"', $this->phpVersion->supportsUnicodeEscapes()); $$ = new Scalar\InterpolatedS… 1202 { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); }
|
/PHP-Parser/lib/PhpParser/Parser/ |
H A D | Php7.php | 2123 if (!$self->phpVersion->allowsAssignNewByReference()) { 2472 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2475 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2530 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicode… 2534 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicode… 2537 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOc…
|
H A D | Php8.php | 2117 if (!$self->phpVersion->allowsAssignNewByReference()) { 2466 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2469 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2524 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicode… 2528 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicode… 2531 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOc…
|
/PHP-Parser/ |
H A D | UPGRADE-5.0.md | 392 The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defau…
|
H A D | CHANGELOG.md | 430 * Added `phpVersion` option to the emulative lexer, which allows controlling the target version to
|