xref: /PHP-8.2/Zend/tests/enum/no-new.phpt (revision 269c8dac)
1--TEST--
2Enum no new
3--FILE--
4<?php
5
6enum Foo {}
7
8try {
9    new Foo();
10} catch (\Error $e) {
11    echo $e->getMessage();
12}
13
14?>
15--EXPECT--
16Cannot instantiate enum Foo
17