Home
last modified time | relevance | path

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

/PHP-Parser/test_old/
H A Drun.php50 $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 DEmulative.php36 * @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 DEmulativeTest.php399 … public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens): void { argument
400 $lexer = new Emulative(PhpVersion::fromString($phpVersion));
/PHP-Parser/doc/component/
H A DPretty_printing.markdown37 * `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 DParserAbstract.php41 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 DPrettyPrinterAbstract.php120 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 DStandard.php140 $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 Dphp.y956 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 DPhp7.php2123 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 DPhp8.php2117 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 DUPGRADE-5.0.md392 The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defau…
H A DCHANGELOG.md430 * Added `phpVersion` option to the emulative lexer, which allows controlling the target version to

Completed in 56 milliseconds