xref: /PHP-5.5/tests/lang/bug25547.phpt (revision 610c7fbe)
1--TEST--
2Bug #25547 (error_handler and array index with function call)
3--FILE--
4<?php
5
6function handler($errno, $errstr, $errfile, $errline, $context)
7{
8	echo __FUNCTION__ . "($errstr)\n";
9}
10
11set_error_handler('handler');
12
13function foo($x) {
14	return "foo";
15}
16
17$output = array();
18++$output[foo("bar")];
19
20print_r($output);
21
22echo "Done";
23?>
24--EXPECT--
25handler(Undefined index: foo)
26Array
27(
28    [foo] => 1
29)
30Done
31