ID: 12622 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Analyzed Bug Type: Class/Object related Operating System: linux 2.2 PHP Version: 4.0.6 New Comment:
Reproduced with PHP 4.1.0RC1. Here is better example script (static is reserverd keyword): <?php class blaah { function method() { echo get_class($this); } } class Container { function Container() { blaah::method(); } } $Container = new Container(); ?> Previous Comments: ------------------------------------------------------------------------ [2001-08-07 11:00:57] [EMAIL PROTECTED] When calling a static function from within another class the $this - reference is not empty, but it points to the class in which you call the static function. To illustrate: class Static { function method() { echo get_class($this); } } class Container { function Container() { Static::method(); } } $Container = new Container(); The output is "Container", but there shouldn't be a reference, because it's not anymore the scope of the reference. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12622&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]