mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
d30cd7d7e7
Closes GH-5590
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
|