xref: /php-src/Zend/tests/gh13097_a.phpt (revision 1e3d9189)
1--TEST--
2GH-13097 (Anonymous class reference in trigger_error / thrown Exception)
3--FILE--
4<?php
5
6$anonymous = new class(){};
7
8trigger_error(
9    get_class($anonymous).' ...now you don\'t!',
10    E_USER_ERROR
11);
12
13?>
14--EXPECTF--
15Deprecated: Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead in %s on line %d
16
17Fatal error: class@anonymous%s ...now you don't! in %s on line %d
18