summaryrefslogtreecommitdiff
path: root/Zend/tests/bug78344.phpt
blob: ea628aaf01756996cf3e63cbc02c21f4e4fdcaff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--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