1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/Zend/tests/varSyntax/globalNonSimpleVariableError.phpt
Nikita Popov 2a04efe0e4 Remove unnecessary precedence/associativity annotations
Some of these are entirely unnecessary. Some specify an associativity
for operators where the concept doesn't make sense and has no effect:
Explicit associativity is only meaningful for binary operators. For
unary operators and constrained operations like instanceof or assignment
the associativity specification has no effect and only serves to confuse.

For example assignments were specified as %left, even though they will
actually behave as right-associative due to the variable requirement on
the LHS. Similarly instanceof was specified as %nonassoc, but it will
behave as left-associative, due to the restrictions places on the RHS.
2019-03-15 12:01:58 +01:00

11 lines
207 B
PHP

--TEST--
Global keyword only accepts simple variables
--FILE--
<?php
global $$foo->bar;
?>
--EXPECTF--
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ';' or ',' in %s on line %d