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