exception_018.phpt 454 B

123456789101112131415
  1. --TEST--
  2. Testing throw exception doesn't crash with wrong params, variant 1
  3. --FILE--
  4. <?php
  5. class Hello extends Exception {}
  6. throw new Hello(new stdClass);
  7. ?>
  8. --EXPECTF--
  9. Fatal error: Uncaught Error: Wrong parameters for Hello([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_018.php:%d
  10. Stack trace:
  11. #0 %sexception_018.php(%d): Exception->__construct(Object(stdClass))
  12. #1 {main}
  13. thrown in %sexception_018.php on line %d