php-src/Zend/tests/invalid_parent_const_ref_leak.phpt
2020-07-10 21:05:28 +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