#34439 [Opn->Bgs]: $this present when it shouldn't
| From: | derick@php.net | Date: | Fri, 09 Sep 2005 15:15:27 +0000 |
| Subject: | #34439 [Opn->Bgs]: $this present when it shouldn't | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84799@lists.php.net to get a copy of this message | ||
ID: 34439
Updated by: derick@php.net
Reported By: rganogork at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: gentoo linux
PHP Version: 4.4.0
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
,
Previous Comments:
------------------------------------------------------------------------
[2005-09-09 17:09:51] rganogork at gmail dot com
Description:
------------
$this should not be defined in the context of a static function call.
Reproduce code:
---------------
class A {
function func() {
echo get_class($this);
}
}
class B {
function x() {
A::func();
}
}
$b = new B();
$b->x();
Expected result:
----------------
.. nothing .. (object not present/instantiated/defined)
Actual result:
--------------
b
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34439&edit=1