catchable_error_001.phpt 550 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Catchable fatal error [1]
  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. blah (new StdClass);
  16. echo "ALIVE!\n";
  17. ?>
  18. --EXPECTF--
  19. Fatal error: Uncaught TypeError: blah(): Argument #1 ($a) must be of type Foo, stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5
  20. Stack trace:
  21. #0 %s(%d): blah(Object(stdClass))
  22. #1 {main}
  23. thrown in %scatchable_error_001.php on line 5