#21888 [NEW]: protected property and protected method of the same name
| From: | ulf dot wendel at phpdoc dot de | Date: | Sun, 26 Jan 2003 18:24:02 +0000 |
| Subject: | #21888 [NEW]: protected property and protected method of the same name | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-31279@lists.php.net to get a copy of this message | ||
From: ulf.wendel@phpdoc.de
Operating system: Win XP Prof
PHP version: 5CVS-2003-01-26 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: protected property and protected method of the same name
OO: in case I have a protected property and a protected method of the same
name, I'll get a fatal error messages saving:
Fatal error: Call to undefined function () in ...
PHP:
System Windows NT localhost 5.1 build 2600
Build Date Jan 23 2003 16:14:26
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path E:\php\php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 90021012
Debug Build no
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib
Zend Engine v2.0.0-dev
Code:
class mom {
protected $prot = "protected property\n";
protected function prot() {
print "protected method\n";
}
}
class mom::child extends mom {
protected $prot;
public function callMom() {
$this->prot();
// $this->priv();
}
public function viewMom() {
print $this->prot;
// print $this->priv;
}
}
$c = new mom::child();
$c->callMom();
$c->viewMom();
--
Edit bug report at http://bugs.php.net/?id=21888&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21888&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21888&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21888&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21888&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21888&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21888&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21888&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21888&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21888&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21888&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21888&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21888&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21888&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21888&r=gnused