diff options
Diffstat (limited to 'Zend/tests/restrict_globals/invalid_foreach.phpt')
-rw-r--r-- | Zend/tests/restrict_globals/invalid_foreach.phpt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/restrict_globals/invalid_foreach.phpt b/Zend/tests/restrict_globals/invalid_foreach.phpt new file mode 100644 index 0000000000..0e7c74881a --- /dev/null +++ b/Zend/tests/restrict_globals/invalid_foreach.phpt @@ -0,0 +1,10 @@ +--TEST-- +Cannot use $GLOBALS as foreach result variable +--FILE-- +<?php + +foreach ([1] as $GLOBALS) {} + +?> +--EXPECTF-- +Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d |