summaryrefslogtreecommitdiff
path: root/Zend/tests/bug45910_2.phpt
blob: a93f424f4d59cbcfedeb7fec1c62885680ff273f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #45910.2 (Cannot declare self-referencing constant)
--FILE--
<?php

class foo {
    const AAA = 'x';
    const BBB = 'a';
    const CCC = 'a';
    const DDD = self::AAA;

    private static $foo = array(
        self::BBB	=> 'a',
        self::CCC	=> 'b',
        self::DDD	=>  11
    );

    public static function test() {
        self::$foo;
    }
}

foo::test();

print 1;
?>
--EXPECT--
1