1--TEST--
2Enum no new through reflection
3--FILE--
4<?php
5
6enum Foo {}
7
8try {
9    (new \ReflectionClass(Foo::class))->newInstanceWithoutConstructor();
10} catch (Error $e) {
11    echo $e->getMessage() . "\n";
12}
13
14?>
15--EXPECT--
16Cannot instantiate enum Foo
17