summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2018-05-28 00:48:35 +0200
committerBob Weinand <bobwei9@hotmail.com>2018-05-28 00:48:35 +0200
commit97a84831432a9b727235ee4727905919681aeac4 (patch)
treed04ea1799e513a99a24e522e52023b72491bdf22 /Zend
parent34fb42970a40673e17778ae06fdab751046ccf1d (diff)
downloadphp-git-97a84831432a9b727235ee4727905919681aeac4.tar.gz
Fixed bug #76383 (array_map on $GLOBALS returns IS_INDIRECT)
Diffstat (limited to 'Zend')
-rw-r--r--Zend/tests/bug76383.phpt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Zend/tests/bug76383.phpt b/Zend/tests/bug76383.phpt
new file mode 100644
index 0000000000..ae26ba8acd
--- /dev/null
+++ b/Zend/tests/bug76383.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #76383: array_map on $GLOBALS returns IS_INDIRECT
+--FILE--
+<?php
+
+$a = 1;
+array_map(function($x) use (&$lastval) { $lastval = $x; }, $GLOBALS);
+var_dump(gettype($lastval), $lastval); // will contain $a
+
+?>
+--EXPECT--
+string(7) "integer"
+int(1)