1--TEST--
2Disallow fetching properties in constant expressions on non-enums
3--FILE--
4<?php
5
6class A {
7    public $prop = 42;
8}
9
10const A_prop = (new A)->prop;
11
12?>
13--EXPECTF--
14Fatal error: Uncaught Error: Fetching properties on non-enums in constant expressions is not allowed in %s:%d
15Stack trace:
16#0 {main}
17  thrown in %s on line %d
18