summaryrefslogtreecommitdiff
path: root/Zend/tests/invalid_parent_const_ref_leak.phpt
blob: 33e2548f315c68aab5925b886e34590970c9d626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Leak when using an invalid parent:: reference in a constant definition
--FILE--
<?php

class A {
    const B = parent::C;
}

try {
    A::B;
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Cannot access parent:: when current class scope has no parent