exception_022.phpt 396 B

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