php-src/Zend/tests/gh13097_b.phpt
2024-01-16 21:05:04 +01:00

19 lines
360 B
PHP

--TEST--
GH-13097 (Anonymous class reference in trigger_error / thrown Exception)
--FILE--
<?php
$anonymous = new class(){};
throw new Exception(
get_class($anonymous).' ...now you don\'t!',
E_USER_ERROR
);
?>
--EXPECTF--
Fatal error: Uncaught Exception: class@anonymous%s ...now you don't! in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d