summaryrefslogtreecommitdiff
path: root/Zend/tests/bug76869.phpt
blob: a19d2dfedbfe48435ba925d48fdd86e928245431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #76869 (Incorrect bypassing protected method accessibility check)
--FILE--
<?php
class A {
    private function f() {
        return "A";
    }
}
class B extends A {
    protected function f() {
        return "B";
    }
}
$b = new B();
try {
    var_dump($b->f());
} catch (Throwable $e) {
    echo "Exception: ", $e->getMessage(), "\n";
}
?>
--EXPECT--
Exception: Call to protected method B::f() from global scope