PHP 8.4
8.5 8.4
Grammar changes
Tokens
Source: Zend/zend_language_parser.y @ php-8.4.0 (b437f2b) / lrama 0.8.0 / 2024-11-20
These diagrams describe a parser grammar, rather than the complete language specification. Lexer state and semantic checks may impose additional restrictions.
Zend Engine License 2.00
Start wrapper
Unreachable
BNF $accept ::= start END
Used by (0)
References (1)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
end of file
BNF start ::= top_statement_list
Used by (1)
References (1)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
start › top_statement_list › top_statement › namespace_declaration_name › identifier › semi_reserved › reserved_non_modifiers
BNF reserved_non_modifiers ::= T_INCLUDE
| T_INCLUDE_ONCE
| T_EVAL
| T_REQUIRE
| T_REQUIRE_ONCE
| T_LOGICAL_OR
| T_LOGICAL_XOR
| T_LOGICAL_AND
| T_INSTANCEOF
| T_NEW
| T_CLONE
| T_EXIT
| T_IF
| T_ELSEIF
| T_ELSE
| T_ENDIF
| T_ECHO
| T_DO
| T_WHILE
| T_ENDWHILE
| T_FOR
| T_ENDFOR
| T_FOREACH
| T_ENDFOREACH
| T_DECLARE
| T_ENDDECLARE
| T_AS
| T_TRY
| T_CATCH
| T_FINALLY
| T_THROW
| T_USE
| T_INSTEADOF
| T_GLOBAL
| T_VAR
| T_UNSET
| T_ISSET
| T_EMPTY
| T_CONTINUE
| T_GOTO
| T_FUNCTION
| T_CONST
| T_RETURN
| T_PRINT
| T_YIELD
| T_LIST
| T_SWITCH
| T_ENDSWITCH
| T_CASE
| T_DEFAULT
| T_BREAK
| T_ARRAY
| T_CALLABLE
| T_EXTENDS
| T_IMPLEMENTS
| T_NAMESPACE
| T_TRAIT
| T_INTERFACE
| T_CLASS
| T_CLASS_C
| T_TRAIT_C
| T_FUNC_C
| T_METHOD_C
| T_LINE
| T_FILE
| T_DIR
| T_NS_C
| T_FN
| T_MATCH
| T_ENUM
| T_PROPERTY_C
Used by (2)
References (0)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INCLUDE
start › top_statement_list › top_statement › statement › expr › ampersand
BNF ampersand ::= T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
| T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG
Used by (5)
References (0)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
start › top_statement_list
BNF top_statement_list ::= top_statement_list top_statement
| ε
Used by (3)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
start › top_statement_list › top_statement › attributes › attribute
BNF attribute ::= T_ATTRIBUTE attribute_group possible_comma ']'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
#[ static ]
start › top_statement_list › top_statement › attributes
BNF attributes ::= attribute
| attributes attribute
Used by (8)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
#[ static ]
start › top_statement_list › top_statement › attributed_statement
BNF attributed_statement ::= function_declaration_statement
| class_declaration_statement
| trait_declaration_statement
| interface_declaration_statement
| enum_declaration_statement
Used by (2)
References (5)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
class identifier { }
start › top_statement_list › top_statement
BNF top_statement ::= statement
| attributed_statement
| attributes attributed_statement
| T_HALT_COMPILER '(' ')' ';'
| T_NAMESPACE namespace_declaration_name ';'
| T_NAMESPACE namespace_declaration_name $@1 '{' top_statement_list '}'
| T_NAMESPACE $@2 '{' top_statement_list '}'
| T_USE mixed_group_use_declaration ';'
| T_USE use_type group_use_declaration ';'
| T_USE use_declarations ';'
| T_USE use_type use_declarations ';'
| T_CONST const_list ';'
Used by (1)
References (12)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INLINE_HTML
Midrule action
start › top_statement_list › top_statement › $@1
BNF $@1 ::= ε
Used by (1)
References (0)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
Midrule action
start › top_statement_list › top_statement › $@2
BNF $@2 ::= ε
Used by (1)
References (0)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
start › top_statement_list › top_statement › use_type
BNF use_type ::= T_FUNCTION
| T_CONST
Used by (2)
References (0)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
function
start › top_statement_list › top_statement › group_use_declaration
BNF group_use_declaration ::= legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations possible_comma '}'
Used by (1)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier \\ { identifier }
start › top_statement_list › top_statement › mixed_group_use_declaration
BNF mixed_group_use_declaration ::= legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations possible_comma '}'
Used by (1)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier \\ { identifier }
start › top_statement_list › top_statement › use_declarations
BNF use_declarations ::= use_declarations ',' use_declaration
| use_declaration
Used by (2)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier
start › top_statement_list › top_statement › use_declarations › use_declaration
BNF use_declaration ::= legacy_namespace_name
| legacy_namespace_name T_AS T_STRING
Used by (1)
References (1)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier
start › top_statement_list › top_statement › const_list
BNF const_list ::= const_list ',' const_decl
| const_decl
Used by (3)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier = T_YIELD
start › top_statement_list › top_statement › statement
BNF statement ::= '{' inner_statement_list '}'
| if_stmt
| alt_if_stmt
| T_WHILE '(' expr ')' while_statement
| T_DO statement T_WHILE '(' expr ')' ';'
| T_FOR '(' for_exprs ';' for_exprs ';' for_exprs ')' for_statement
| T_SWITCH '(' expr ')' switch_case_list
| T_BREAK optional_expr ';'
| T_CONTINUE optional_expr ';'
| T_RETURN optional_expr ';'
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML
| expr ';'
| T_UNSET '(' unset_variables possible_comma ')' ';'
| T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement
| T_FOREACH '(' expr T_AS foreach_variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement
| T_DECLARE '(' const_list ')' $@3 declare_statement
| ';'
| T_TRY '{' inner_statement_list '}' catch_list finally_statement
| T_GOTO T_STRING ';'
| T_STRING ':'
Used by (9)
References (22)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INLINE_HTML
Code example <?php
if (true) { echo "hello"; }
Midrule action
start › top_statement_list › top_statement › statement › $@3
BNF $@3 ::= ε
Used by (1)
References (0)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
start › top_statement_list › top_statement › statement › catch_list
BNF catch_list ::= ε
| catch_list T_CATCH '(' catch_name_list optional_variable ')' '{' inner_statement_list '}'
Used by (2)
References (4)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
start › top_statement_list › top_statement › statement › unset_variables
BNF unset_variables ::= unset_variable
| unset_variables ',' unset_variable
Used by (2)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › attributed_statement › function_declaration_statement
BNF function_declaration_statement ::= function returns_ref function_name backup_doc_comment '(' parameter_list ')' return_type backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
Used by (1)
References (8)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
function identifier ( ) { }
start › top_statement_list › top_statement › attributed_statement › class_declaration_statement
BNF class_declaration_statement ::= class_modifiers T_CLASS @4 T_STRING extends_from implements_list backup_doc_comment '{' class_statement_list '}'
| T_CLASS @5 T_STRING extends_from implements_list backup_doc_comment '{' class_statement_list '}'
Used by (1)
References (7)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
class identifier { }
start › top_statement_list › top_statement › attributed_statement › enum_declaration_statement
BNF enum_declaration_statement ::= T_ENUM @8 T_STRING enum_backing_type implements_list backup_doc_comment '{' class_statement_list '}'
Used by (1)
References (5)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
enum identifier { }
start › top_statement_list › top_statement › statement › foreach_variable
BNF foreach_variable ::= variable
| ampersand variable
| T_LIST '(' array_pair_list ')'
| '[' array_pair_list ']'
Used by (1)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › statement › for_statement
BNF for_statement ::= statement
| ':' inner_statement_list T_ENDFOR ';'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INLINE_HTML
start › top_statement_list › top_statement › statement › foreach_statement
BNF foreach_statement ::= statement
| ':' inner_statement_list T_ENDFOREACH ';'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INLINE_HTML
start › top_statement_list › top_statement › statement › declare_statement
BNF declare_statement ::= statement
| ':' inner_statement_list T_ENDDECLARE ';'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INLINE_HTML
start › top_statement_list › top_statement › statement › switch_case_list
BNF switch_case_list ::= '{' case_list '}'
| '{' ';' case_list '}'
| ':' case_list T_ENDSWITCH ';'
| ':' ';' case_list T_ENDSWITCH ';'
Used by (1)
References (1)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
{ }
start › top_statement_list › top_statement › statement › switch_case_list › case_list
BNF case_list ::= ε
| case_list T_CASE expr case_separator inner_statement_list
| case_list T_DEFAULT case_separator inner_statement_list
Used by (2)
References (4)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
start › top_statement_list › top_statement › statement › expr › match
BNF match ::= T_MATCH '(' expr ')' '{' match_arm_list '}'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
match ( T_YIELD ) { }
start › top_statement_list › top_statement › statement › while_statement
BNF while_statement ::= statement
| ':' inner_statement_list T_ENDWHILE ';'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INLINE_HTML
start › top_statement_list › top_statement › statement › if_stmt › if_stmt_without_else
BNF if_stmt_without_else ::= T_IF '(' expr ')' statement
| if_stmt_without_else T_ELSEIF '(' expr ')' statement
Used by (2)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
if ( T_YIELD ) T_INLINE_HTML
start › top_statement_list › top_statement › statement › if_stmt
BNF if_stmt ::= if_stmt_without_else
| if_stmt_without_else T_ELSE statement
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
if ( T_YIELD ) T_INLINE_HTML
start › top_statement_list › top_statement › statement › alt_if_stmt › alt_if_stmt_without_else
BNF alt_if_stmt_without_else ::= T_IF '(' expr ')' ':' inner_statement_list
| alt_if_stmt_without_else T_ELSEIF '(' expr ')' ':' inner_statement_list
Used by (2)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
if ( T_YIELD ) :
start › top_statement_list › top_statement › statement › alt_if_stmt
BNF alt_if_stmt ::= alt_if_stmt_without_else T_ENDIF ';'
| alt_if_stmt_without_else T_ELSE ':' inner_statement_list T_ENDIF ';'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
if ( T_YIELD ) : endif ;
start › top_statement_list › top_statement › statement › global_var_list
BNF global_var_list ::= global_var_list ',' global_var
| global_var
Used by (2)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › statement › static_var_list
BNF static_var_list ::= static_var_list ',' static_var
| static_var
Used by (2)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › attributed_statement › class_declaration_statement › class_statement_list › class_statement › attributed_class_statement
BNF attributed_class_statement ::= property_modifiers optional_type_without_static property_list ';'
| property_modifiers optional_type_without_static hooked_property
| class_const_modifiers T_CONST class_const_list ';'
| class_const_modifiers T_CONST type_expr class_const_list ';'
| method_modifiers function returns_ref identifier backup_doc_comment '(' parameter_list ')' return_type backup_fn_flags method_body backup_fn_flags
| enum_case
Used by (1)
References (17)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
case identifier ;
start › top_statement_list › top_statement › attributed_statement › class_declaration_statement › class_statement_list › class_statement › attributed_class_statement › method_body
BNF method_body ::= ';'
| '{' inner_statement_list '}'
Used by (1)
References (1)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
;
start › top_statement_list › top_statement › attributed_statement › class_declaration_statement › class_statement_list › class_statement › attributed_class_statement › hooked_property › property_hook_list › property_hook › property_hook_body
BNF property_hook_body ::= ';'
| '{' inner_statement_list '}'
| T_DOUBLE_ARROW expr ';'
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
;
start › top_statement_list › top_statement › const_list › const_decl
BNF const_decl ::= T_STRING '=' expr backup_doc_comment
Used by (1)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier = T_YIELD
start › top_statement_list › top_statement › statement › echo_expr_list
BNF echo_expr_list ::= echo_expr_list ',' echo_expr
| echo_expr
Used by (2)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_YIELD
start › top_statement_list › top_statement › statement › for_exprs
BNF for_exprs ::= ε
| non_empty_for_exprs
Used by (1)
References (1)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
ε
start › top_statement_list › top_statement › statement › expr › new_dereferenceable › anonymous_class
BNF anonymous_class ::= anonymous_class_modifiers_optional T_CLASS @10 ctor_arguments extends_from implements_list backup_doc_comment '{' class_statement_list '}'
Used by (1)
References (7)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
class { }
start › top_statement_list › top_statement › statement › expr › new_dereferenceable
BNF new_dereferenceable ::= T_NEW class_name_reference argument_list
| T_NEW anonymous_class
| T_NEW attributes anonymous_class
Used by (3)
References (4)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
new static ( )
start › top_statement_list › top_statement › statement › expr
BNF expr ::= variable
| T_LIST '(' array_pair_list ')' '=' expr
| '[' array_pair_list ']' '=' expr
| variable '=' expr
| variable '=' ampersand variable
| T_CLONE expr
| variable T_PLUS_EQUAL expr
| variable T_MINUS_EQUAL expr
| variable T_MUL_EQUAL expr
| variable T_POW_EQUAL expr
| variable T_DIV_EQUAL expr
| variable T_CONCAT_EQUAL expr
| variable T_MOD_EQUAL expr
| variable T_AND_EQUAL expr
| variable T_OR_EQUAL expr
| variable T_XOR_EQUAL expr
| variable T_SL_EQUAL expr
| variable T_SR_EQUAL expr
| variable T_COALESCE_EQUAL expr
| variable T_INC
| T_INC variable
| variable T_DEC
| T_DEC variable
| expr T_BOOLEAN_OR expr
| expr T_BOOLEAN_AND expr
| expr T_LOGICAL_OR expr
| expr T_LOGICAL_AND expr
| expr T_LOGICAL_XOR expr
| expr '|' expr
| expr T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr
| expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG expr
| expr '^' expr
| expr '.' expr
| expr '+' expr
| expr '-' expr
| expr '*' expr
| expr T_POW expr
| expr '/' expr
| expr '%' expr
| expr T_SL expr
| expr T_SR expr
| '+' expr
| '-' expr
| '!' expr
| '~' expr
| expr T_IS_IDENTICAL expr
| expr T_IS_NOT_IDENTICAL expr
| expr T_IS_EQUAL expr
| expr T_IS_NOT_EQUAL expr
| expr '<' expr
| expr T_IS_SMALLER_OR_EQUAL expr
| expr '>' expr
| expr T_IS_GREATER_OR_EQUAL expr
| expr T_SPACESHIP expr
| expr T_INSTANCEOF class_name_reference
| '(' expr ')'
| new_dereferenceable
| new_non_dereferenceable
| expr '?' expr ':' expr
| expr '?' ':' expr
| expr T_COALESCE expr
| internal_functions_in_yacc
| T_INT_CAST expr
| T_DOUBLE_CAST expr
| T_STRING_CAST expr
| T_ARRAY_CAST expr
| T_OBJECT_CAST expr
| T_BOOL_CAST expr
| T_UNSET_CAST expr
| T_EXIT ctor_arguments
| '@' expr
| scalar
| '`' backticks_expr '`'
| T_PRINT expr
| T_YIELD
| T_YIELD expr
| T_YIELD expr T_DOUBLE_ARROW expr
| T_YIELD_FROM expr
| T_THROW expr
| inline_function
| attributes inline_function
| T_STATIC inline_function
| attributes T_STATIC inline_function
| match
Used by (32)
References (14)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_YIELD
Code example <?php
$result = (1 + 2) * 3;
start › top_statement_list › top_statement › statement › expr › inline_function
BNF inline_function ::= function returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
| fn returns_ref backup_doc_comment '(' parameter_list ')' return_type T_DOUBLE_ARROW backup_fn_flags backup_lex_pos expr backup_fn_flags
Used by (1)
References (11)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
function ( ) { }
start › top_statement_list › top_statement › statement › expr › variable › callable_variable › function_call
BNF function_call ::= name argument_list
| T_READONLY argument_list
| class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
| callable_expr @11 argument_list
Used by (1)
References (7)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier ( )
start › top_statement_list › top_statement › statement › expr › scalar › dereferenceable_scalar
BNF dereferenceable_scalar ::= T_ARRAY '(' array_pair_list ')'
| '[' array_pair_list ']'
| T_CONSTANT_ENCAPSED_STRING
| '"' encaps_list '"'
Used by (3)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
quoted string
start › top_statement_list › top_statement › statement › expr › scalar
BNF scalar ::= T_LNUMBER
| T_DNUMBER
| T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
| T_START_HEREDOC T_END_HEREDOC
| T_START_HEREDOC encaps_list T_END_HEREDOC
| dereferenceable_scalar
| constant
| class_constant
Used by (1)
References (4)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
integer
start › top_statement_list › top_statement › statement › expr › scalar › constant
BNF constant ::= name
| T_LINE
| T_FILE
| T_DIR
| T_TRAIT_C
| T_METHOD_C
| T_FUNC_C
| T_PROPERTY_C
| T_NS_C
| T_CLASS_C
Used by (2)
References (1)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
identifier
start › top_statement_list › top_statement › statement › expr › scalar › class_constant
BNF class_constant ::= class_name T_PAAMAYIM_NEKUDOTAYIM identifier
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM identifier
| class_name T_PAAMAYIM_NEKUDOTAYIM '{' expr '}'
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM '{' expr '}'
Used by (2)
References (4)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
static :: identifier
start › top_statement_list › top_statement › statement › expr › variable › callable_variable
BNF callable_variable ::= simple_variable
| array_object_dereferenceable '[' optional_expr ']'
| array_object_dereferenceable T_OBJECT_OPERATOR property_name argument_list
| array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list
| function_call
Used by (2)
References (6)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › statement › expr › variable
BNF variable ::= callable_variable
| static_member
| array_object_dereferenceable T_OBJECT_OPERATOR property_name
| array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name
Used by (6)
References (4)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › statement › expr › variable › static_member
BNF static_member ::= class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable
Used by (1)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
static :: variable
start › top_statement_list › top_statement › statement › expr › class_name_reference › new_variable
BNF new_variable ::= simple_variable
| new_variable '[' optional_expr ']'
| new_variable T_OBJECT_OPERATOR property_name
| new_variable T_NULLSAFE_OBJECT_OPERATOR property_name
| class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable
| new_variable T_PAAMAYIM_NEKUDOTAYIM simple_variable
Used by (2)
References (5)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › statement › expr › scalar › encaps_list
BNF encaps_list ::= encaps_list encaps_var
| encaps_list T_ENCAPSED_AND_WHITESPACE
| encaps_var
| T_ENCAPSED_AND_WHITESPACE encaps_var
Used by (4)
References (2)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › statement › expr › scalar › encaps_list › encaps_var
BNF encaps_var ::= T_VARIABLE
| T_VARIABLE '[' encaps_var_offset ']'
| T_VARIABLE T_OBJECT_OPERATOR T_STRING
| T_VARIABLE T_NULLSAFE_OBJECT_OPERATOR T_STRING
| T_DOLLAR_OPEN_CURLY_BRACES expr '}'
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}'
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}'
| T_CURLY_OPEN variable '}'
Used by (1)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
variable
start › top_statement_list › top_statement › statement › expr › internal_functions_in_yacc
BNF internal_functions_in_yacc ::= T_ISSET '(' isset_variables possible_comma ')'
| T_EMPTY '(' expr ')'
| T_INCLUDE expr
| T_INCLUDE_ONCE expr
| T_EVAL '(' expr ')'
| T_REQUIRE expr
| T_REQUIRE_ONCE expr
Used by (1)
References (3)
Shortest derivation This is a token sequence derived from the grammar. It may require lexer context or semantic checks to be valid code.
T_INCLUDE T_YIELD