errmsg_045.phpt 585 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 { function test() { } } class B extends A { function test($a) { } }');
  12. ?>
  13. --EXPECTF--
  14. string(62) "Declaration of B::test($a) should be compatible with A::test()"
  15. string(%d) "%s(%d) : eval()'d code"
  16. Notice: Undefined variable: undefined in %s on line %d