1--TEST--
2Conversion of a class constant to a reference after it has been cached
3--FILE--
4<?php
5
6class Test {
7    const TEST = 'TEST';
8
9    private $prop;
10
11    public function readConst() {
12        $this->prop = self::TEST;
13    }
14}
15
16function doTest() {
17    $obj = new Test;
18    $obj->readConst();
19    unset($obj);
20    var_dump(Test::TEST);
21}
22
23doTest();
24eval('class Test2 extends Test {}');
25doTest();
26
27?>
28--EXPECT--
29string(4) "TEST"
30string(4) "TEST"
31