ID: 37654
Updated by: [EMAIL PROTECTED]
Reported By: mjarco at zhr dot pl
-Status: Open
+Status: Wont fix
Bug Type: Scripting Engine problem
Operating System: Windows/Linux
PHP Version: 5.1.4
New Comment:
This is called "late static binding" and we're still thinking on the
best implementaion of it.
Until then -> won't fix.
Previous Comments:
------------------------------------------------------------------------
[2006-05-31 15:24:07] mjarco at zhr dot pl
Description:
------------
I think there is a bug when you want to cover private method in child
class, and run it by public inherited method. See example:
Reproduce code:
---------------
class Bar
{
private function shmoo()
{
print 'bar';
}
public function exe()
{
$this->shmoo();
}
}
class FooBar extends Bar
{
//change to protected, and public see what happens
private function shmoo()
{
print 'foobar';
}
}
$bar = new FooBar;
$bar->exe();
Expected result:
----------------
foobar
Actual result:
--------------
bar
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37654&edit=1