fatal_error_ignore_non_fatals.phpt 545 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Test V8::executeString() : Fatal Error handler to ignore warnings
  3. --SKIPIF--
  4. <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
  5. --FILE--
  6. <?php
  7. $js = new V8Js();
  8. $js->foo = function() {
  9. echo $bar;
  10. trigger_error('Foo Bar!', E_USER_WARNING);
  11. echo "blar foo\n";
  12. };
  13. $script = <<<END
  14. PHP.foo();
  15. END;
  16. $js->executeString($script);
  17. ?>
  18. ===EOF===
  19. --EXPECTF--
  20. Notice: Undefined variable: bar in %s%efatal_error_ignore_non_fatals.php on line 6
  21. Warning: Foo Bar! in %s%efatal_error_ignore_non_fatals.php on line 7
  22. blar foo
  23. ===EOF===