exception_019.phpt 408 B

1234567891011121314
  1. --TEST--
  2. Testing throw exception doesn't crash with wrong params, variant 2
  3. --FILE--
  4. <?php
  5. throw new Exception(new stdClass);
  6. ?>
  7. --EXPECTF--
  8. Fatal error: Uncaught TypeError: Exception::__construct(): Argument #1 ($message) must be of type string, stdClass given in %s:%d
  9. Stack trace:
  10. #0 %sexception_019.php(%d): Exception->__construct(Object(stdClass))
  11. #1 {main}
  12. thrown in %sexception_019.php on line %d