php-src/Zend/tests/invalid_parent_const_ref_leak.phpt
2016-05-02 19:59:43 +02:00

19 lines
283 B
PHP

--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