1--TEST--
2New not allowed in class constant
3--FILE--
4<?php
5
6// New in class constants (and static properties) brings up evaluation order questions: When
7// should the (potentially side-effecting) new expression be evaluated? Evaluating it when the
8// class is declared would break references to classes that are declared later in the same
9// file. On the other hand, the current lazy evaluation of initializers is somewhat ill-defined
10// when we start considering side-effecting expressions.
11
12class Test {
13    const X = new stdClass;
14}
15
16?>
17--EXPECTF--
18Fatal error: New expressions are not supported in this context in %s on line %d
19