1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/Zend/tests/bug76869.phpt
2020-07-10 21:05:28 +02:00

24 lines
429 B
PHP

--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