mirror of
https://github.com/php/php-src.git
synced 2026-03-30 12:13:02 +02:00
I'm removing the argument entirely here, but we might want to change this to passing null or and empty array instead, if the impact of dropping it entirely turns out to be too large. This was deprecated as part of https://wiki.php.net/rfc/deprecations_php_7_2 as a doc-only deprecation.
31 lines
399 B
PHP
31 lines
399 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 index: foo)
|
|
Array
|
|
(
|
|
[foo] => 1
|
|
)
|
|
Done
|