catchable_error_002.phpt 545 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Catchable fatal error [2]
  3. --FILE--
  4. <?php
  5. class Foo {
  6. }
  7. function blah (Foo $a)
  8. {
  9. }
  10. function error()
  11. {
  12. $a = func_get_args();
  13. var_dump($a);
  14. }
  15. set_error_handler('error');
  16. blah (new StdClass);
  17. echo "ALIVE!\n";
  18. ?>
  19. --EXPECTF--
  20. array(5) {
  21. [0]=>
  22. int(4096)
  23. [1]=>
  24. string(%d) "Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line %d and defined"
  25. [2]=>
  26. string(%d) "%scatchable_error_002.php"
  27. [3]=>
  28. int(5)
  29. [4]=>
  30. array(0) {
  31. }
  32. }
  33. ALIVE!