2013-09-29 15:58:25 +00:00
|
|
|
--TEST--
|
|
|
|
Error message in error handler during compilation
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
set_error_handler(function($_, $msg, $file) {
|
|
|
|
var_dump($msg, $file);
|
|
|
|
echo $undefined;
|
|
|
|
});
|
|
|
|
|
2015-03-31 14:10:22 +00:00
|
|
|
/* This is just a particular example of a non-fatal compile-time error
|
|
|
|
* If this breaks in future, just find another example and use it instead */
|
2015-03-15 08:47:25 +00:00
|
|
|
eval('class A { function test() { } } class B extends A { function test($a) { } }');
|
2013-09-29 15:58:25 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2015-03-15 08:47:25 +00:00
|
|
|
string(60) "Declaration of B::test() should be compatible with A::test()"
|
2013-09-29 15:58:25 +00:00
|
|
|
string(%d) "%s(%d) : eval()'d code"
|
|
|
|
|
|
|
|
Notice: Undefined variable: undefined in %s on line %d
|