diff options
author | Marcus Boerger <helly@php.net> | 2003-09-15 20:30:32 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-09-15 20:30:32 +0000 |
commit | 83a48b2603c2b4256d5df27a8c72a50032b41c47 (patch) | |
tree | 7d67ca6d006d0505a258762b83910c9778866d2f /tests | |
parent | 16a816b92c15f25dae8402110ba0193a4bb5bb9c (diff) | |
download | php-git-83a48b2603c2b4256d5df27a8c72a50032b41c47.tar.gz |
Test for bug #25547
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/lang/bug25547.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/lang/bug25547.phpt b/tests/lang/bug25547.phpt new file mode 100755 index 0000000000..cce556ceb9 --- /dev/null +++ b/tests/lang/bug25547.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #25547 (error_handler and array index with function call) +--FILE-- +<?php + +function handler($errno, $errstr, $errfile, $errline, $context) +{ + 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 |