1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/tests/lang/bug25547.phpt
2020-07-10 21:05:28 +02:00

31 lines
410 B
PHP

--TEST--
Bug #25547 (error_handler and array index with function call)
--FILE--
<?php
function handler($errno, $errstr, $errfile, $errline)
{
echo __FUNCTION__ . "($errstr)\n";
}
set_error_handler('handler');
function foo($x) {
return "foo";
}
$output = array();
++$output[foo("bar")];
print_r($output);
echo "Done";
?>
--EXPECT--
handler(Undefined array key "foo")
Array
(
[foo] => 1
)
Done