summaryrefslogtreecommitdiff
path: root/Zend/tests/errmsg_045.phpt
blob: 5a4deadb5926ad470aa2c58aa48ed14feab66c38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Error message in error handler during compilation
--FILE--
<?php

set_error_handler(function($_, $msg, $file) {
	var_dump($msg, $file);
	echo $undefined;
});

/* 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 */
eval('class A { private function __invoke() { } }');

?>
--EXPECTF--
string(76) "The magic method __invoke() must have public visibility and cannot be static"
string(%d) "%s(%d) : eval()'d code"

Notice: Undefined variable: undefined in %s on line %d