mirror of
https://github.com/php/php-src.git
synced 2024-12-16 05:15:03 +08:00
d30cd7d7e7
Closes GH-5590
25 lines
403 B
PHP
25 lines
403 B
PHP
--TEST--
|
|
Bug #78344: Segmentation fault on zend_check_protected
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
protected const FOO = 1;
|
|
}
|
|
|
|
class B {}
|
|
class C extends B {
|
|
public function method() {
|
|
var_dump(A::FOO);
|
|
}
|
|
}
|
|
(new C)->method();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Cannot access protected constant A::FOO in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): C->method()
|
|
#1 {main}
|
|
thrown in %s on line %d
|