summaryrefslogtreecommitdiff
path: root/Zend/tests/restrict_globals/invalid_assign_list.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/restrict_globals/invalid_assign_list.phpt')
-rw-r--r--Zend/tests/restrict_globals/invalid_assign_list.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/restrict_globals/invalid_assign_list.phpt b/Zend/tests/restrict_globals/invalid_assign_list.phpt
new file mode 100644
index 0000000000..8fc3e524a9
--- /dev/null
+++ b/Zend/tests/restrict_globals/invalid_assign_list.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Cannot list-assign to $GLOBALS
+--FILE--
+<?php
+
+list($GLOBALS) = [1];
+
+?>
+--EXPECTF--
+Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d