1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Files
archived-php-src/ext/standard/tests/bug81048.phpt
T
Christoph M. Becker 36b9bdeeec Fix #81048: phpinfo(INFO_VARIABLES) "Array to string conversion"
Now that we properly dereference references of the superglobals. we
also need to dereference contained references to avoid to string
conversion.

Closes GH-7014.
2021-05-19 14:07:15 +02:00

29 lines
404 B
PHP

--TEST--
Bug #81048 (phpinfo(INFO_VARIABLES) "Array to string conversion")
--FILE--
<?php
$_ENV = [];
$_SERVER = ['foo' => ['bar' => ['baz' => 'qux']]];
array_walk_recursive($_SERVER, function($value, $key) {
// NOP
});
phpinfo(INFO_VARIABLES);
?>
--EXPECT--
phpinfo()
PHP Variables
Variable => Value
$_SERVER['foo'] => Array
(
[bar] => Array
(
[baz] => qux
)
)