errmsg_045.phpt 556 B

1234567891011121314151617181920
  1. --TEST--
  2. Error message in error handler during compilation
  3. --FILE--
  4. <?php
  5. set_error_handler(function($_, $msg, $file) {
  6. var_dump($msg, $file);
  7. echo $undefined;
  8. });
  9. /* This is just a particular example of a non-fatal compile-time error
  10. * If this breaks in future, just find another example and use it instead */
  11. eval('class A { private function __invoke() { } }');
  12. ?>
  13. --EXPECTF--
  14. string(%d) "The magic method A::__invoke() must have public visibility"
  15. string(%d) "%s(%d) : eval()'d code"
  16. Warning: Undefined variable $undefined in %s on line %d