mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
add test for this TBF bug
This commit is contained in:
parent
b83a2603b3
commit
b2f7dd2f66
1 changed files with 28 additions and 0 deletions
28
Zend/tests/bug33277.phpt
Normal file
28
Zend/tests/bug33277.phpt
Normal file
|
@ -0,0 +1,28 @@
|
|||
--TEST--
|
||||
Bug #33277 (private method accessed by child class)
|
||||
--FILE--
|
||||
<?
|
||||
class foo {
|
||||
private function bar() {
|
||||
echo "private!\n";
|
||||
}
|
||||
}
|
||||
|
||||
class fooson extends foo {
|
||||
function barson() {
|
||||
$this->bar();
|
||||
}
|
||||
}
|
||||
|
||||
class foo2son extends fooson {
|
||||
|
||||
function bar() {
|
||||
echo "public!\n";
|
||||
}
|
||||
}
|
||||
|
||||
$b = new foo2son();
|
||||
$b->barson();
|
||||
?>
|
||||
--EXPECT--
|
||||
public!
|
Loading…
Add table
Add a link
Reference in a new issue