1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 05:51:02 +02:00
Files
archived-php-src/Zend/tests/constant_expressions_self_referencing_array.phpt
2015-05-17 17:31:43 -05: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::FOO' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d