mirror of
https://github.com/php/php-src.git
synced 2025-01-05 18:33:56 +08:00
c5401854fc
This should fix most of the remaining issues with tabs and spaces being mixed in tests.
28 lines
458 B
PHP
28 lines
458 B
PHP
--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"
|