summaryrefslogtreecommitdiff
path: root/Zend/tests/bug79599.phpt
blob: da72d1c5b7d8e7fcf800363b2c832f19b4a9ebec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Bug #79599 (coredump in set_error_handler)
--FILE--
<?php
set_error_handler(function($code, $message){
	throw new \Exception($message);
});
function test1(){
	$a[] = $b;
}
function test2(){
	$a[$c] = $b;
}
try{
	test1();
}catch(\Exception $e){
	var_dump($e->getMessage());
}
try{
	test2();
}catch(\Exception $e){
	var_dump($e->getMessage());
}
?>
--EXPECT--
string(21) "Undefined variable: b"
string(21) "Undefined variable: c"