summaryrefslogtreecommitdiff
path: root/Zend/tests/this_in_foreach_004.phpt
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-06-19 16:20:02 +0100
committerJakub Zelenka <bukka@php.net>2016-06-19 16:20:02 +0100
commitc2b90805e81de43b4fa28fa1b30ed255bfba76b2 (patch)
treea353bb7b1cb958fd4f3e576ab44f3b6ef03a02c2 /Zend/tests/this_in_foreach_004.phpt
parentb44cf1a8540d321583a0d83ebca688ebab10d3b0 (diff)
parentd0e84c6f4702dc5dda473851dd33c5e6cee82ee6 (diff)
downloadphp-git-c2b90805e81de43b4fa28fa1b30ed255bfba76b2.tar.gz
Merge branch 'master' into openssl_error_store
Diffstat (limited to 'Zend/tests/this_in_foreach_004.phpt')
-rw-r--r--Zend/tests/this_in_foreach_004.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/tests/this_in_foreach_004.phpt b/Zend/tests/this_in_foreach_004.phpt
new file mode 100644
index 0000000000..13bfbf18b4
--- /dev/null
+++ b/Zend/tests/this_in_foreach_004.phpt
@@ -0,0 +1,11 @@
+--TEST--
+$this in foreach
+--FILE--
+<?php
+$a = [[1]];
+foreach ($a as list($this)) {
+ var_dump($this);
+}
+?>
+--EXPECTF--
+Fatal error: Cannot re-assign $this in %sthis_in_foreach_004.php on line 3