mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
6499162ff0
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
17 lines
328 B
PHP
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
|
|
|