xref: /PHP-7.4/Zend/tests/bug45910_2.phpt (revision 782352c5)
1--TEST--
2Bug #45910.2 (Cannot declare self-referencing constant)
3--FILE--
4<?php
5
6class foo {
7	const AAA = 'x';
8	const BBB = 'a';
9	const CCC = 'a';
10	const DDD = self::AAA;
11
12	private static $foo = array(
13		self::BBB	=> 'a',
14		self::CCC	=> 'b',
15		self::DDD	=>  11
16	);
17
18	public static function test() {
19		self::$foo;
20	}
21}
22
23foo::test();
24
25print 1;
26?>
27--EXPECT--
281
29