xref: /PHP-8.1/Zend/tests/bug76383.phpt (revision 97a84831)
1--TEST--
2Bug #76383: array_map on $GLOBALS returns IS_INDIRECT
3--FILE--
4<?php
5
6$a = 1;
7array_map(function($x) use (&$lastval) { $lastval = $x; }, $GLOBALS);
8var_dump(gettype($lastval), $lastval); // will contain $a
9
10?>
11--EXPECT--
12string(7) "integer"
13int(1)
14