Bug #14302 Updated: self:: Accessing methods from within methods without an instance
| From: | zak@php.net | Date: | Sun, 02 Dec 2001 05:11:15 +0000 |
| Subject: | Bug #14302 Updated: self:: Accessing methods from within methods without an instance | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72242@lists.php.net to get a copy of this message | ||
ID: 14302
Updated by: zak
Reported By: ivan.lamouret@novitek.fr
Old Status: Open
Status: Closed
Bug Type: Feature/Change Request
Operating System: any
PHP Version: 4.0.6
New Comment:
There will be significant changes to PHP OO support with
the next version of the Zend Engine.
To get more information, visit:
http://www.zend.com/engine2/ZendEngine-2.0.pdf
http://www.zend.com/zend/zend-engine-summary.php
http://www.zend.com/zend/zengine/
Previous Comments:
------------------------------------------------------------------------
[2001-11-30 13:18:58] ivan.lamouret@novitek.fr
When inside a class method, there is no "denormalised" way to get at other methods
"statically" i.e.:
class foo(){
function bar(){
// do not use $this;
}
function otherbar(){
foo::bar();// <--- allow self::bar()
}
}
foo::otherbar();
If foo was an extension of some other class foobase, it could get at the foobase::methods with the
"parent::" construct. In other words to get at my parent's method I do not need to
know its name, but if I am not an instance I can not get at my own methods without giving my name.
Since you can call a class method without an instance, this seems a natural extension of php's
::
Thank you all
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14302&edit=1