xref: /PHP-7.3/Zend/tests/errmsg_045.phpt (revision e5fae779)
1--TEST--
2Error message in error handler during compilation
3--FILE--
4<?php
5
6set_error_handler(function($_, $msg, $file) {
7	var_dump($msg, $file);
8	echo $undefined;
9});
10
11/* This is just a particular example of a non-fatal compile-time error
12 * If this breaks in future, just find another example and use it instead */
13eval('class A { function test() { } } class B extends A { function test($a) { } }');
14
15?>
16--EXPECTF--
17string(62) "Declaration of B::test($a) should be compatible with A::test()"
18string(%d) "%s(%d) : eval()'d code"
19
20Notice: Undefined variable: undefined in %s on line %d
21