File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -320,3 +320,17 @@ class AsymmetricVisibilityProperties {
320320
321321 public function __construct (public protected(set ) int $ page = 0 ) {} // Ok.
322322}
323+
324+ /*
325+ * $GLOBALS with non-string key, unable to determine which variable is being overridden.
326+ */
327+ function globals_with_non_string_key () {
328+ $ GLOBALS [ "some {$ name }" ] = 'test ' ; // Ok.
329+ $ GLOBALS [ $ obj ->global_name ] = 'test ' ; // Ok.
330+ $ GLOBALS [ MyClass::GLOBAL_NAME ] = 'test ' ; // Ok.
331+ $ GLOBALS [ GLOBAL_NAME_CONSTANT ] = 'test ' ; // Ok.
332+ $ GLOBALS [ get_my_global_name () ] = 'test ' ; // Ok.
333+ $ GLOBALS [ MyNamespace \get_my_global_name () ] = 'test ' ; // Ok.
334+ $ GLOBALS [ \MyNamespace \get_my_global_name () ] = 'test ' ; // Ok.
335+ $ GLOBALS [ namespace \get_my_global_name () ] = 'test ' ; // Ok.
336+ }
You can’t perform that action at this time.
0 commit comments