blob: 5bfbc61dd08ff4244e1fab8e04097ff1cd139f1b (
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
29
30
|
--TEST--
Conversion of a class constant to a reference after it has been cached
--FILE--
<?php
class Test {
const TEST = 'TEST';
private $prop;
public function readConst() {
$this->prop = self::TEST;
}
}
function doTest() {
$obj = new Test;
$obj->readConst();
unset($obj);
var_dump(Test::TEST);
}
doTest();
eval('class Test2 extends Test {}');
doTest();
?>
--EXPECT--
string(4) "TEST"
string(4) "TEST"
|