mirror of
https://github.com/php/php-src.git
synced 2024-12-21 16:00:18 +08:00
19 lines
283 B
PHP
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
|