From: sysadmin at alexdupre dot com
Operating system: FreeBSD 4-STABLE
PHP version: 5CVS-2003-03-15 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: A derived class cannot call a parent's method that calls a private
method
--TEST--
A derived class can call a parent's protected method that calls a private
method
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip
ZendEngine 2 needed'); ?>
--FILE--
<?php
class Foo {
private function aPrivateMethod() {
echo "Foo::aPrivateMethod() called.\n";
}
protected function aProtectedMethod() {
echo "Foo::aProtectedMethod() called.\n";
$this->aPrivateMethod();
}
}
class Bar extends Foo {
public function aPublicMethod() {
echo "Bar::aPublicMethod() called.\n";
$this->aProtectedMethod();
}
}
$o = new Bar;
$o->aPublicMethod();
?>
--EXPECT--
Bar::aPublicMethod() called.
Foo::aProtectedMethod() called.
Foo::aPrivateMethod() called.
--
Edit bug report at http://bugs.php.net/?id=22725&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22725&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22725&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22725&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22725&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22725&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22725&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22725&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22725&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22725&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22725&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22725&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22725&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22725&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22725&r=gnused