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 { private function __invoke() { } }'); 14 15?> 16--EXPECTF-- 17string(%d) "The magic method A::__invoke() must have public visibility" 18string(%d) "%s(%d) : eval()'d code" 19 20Warning: Undefined variable $undefined in %s on line %d 21