php-src/Zend/tests/constant_expressions_self_referencing_array.phpt
Dmitry Stogov 6499162ff0 - get rid of EG(scope). zend_get_executed_scope() should be used instead.
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00

17 lines
328 B
PHP

--TEST--
Self-referencing constant expression (part of a constant AST)
--FILE--
<?php
class A {
const FOO = [self::BAR];
const BAR = [self::FOO];
}
var_dump(A::FOO);
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::BAR' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d