Bug #53554 [Opn->Dup]: about $this
| From: | cataphract@php.net | Date: | Thu, 16 Dec 2010 10:49:30 +0000 |
| Subject: | Bug #53554 [Opn->Dup]: about $this | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157023@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53554&edit=1
ID: 53554
Updated by: cataphract@php.net
Reported by: smallslime at gmail dot com
Summary: about $this
-Status: Open
+Status: Duplicate
Type: Bug
Package: Class/Object related
Operating System: linux
PHP Version: 5.3.4
Block user comment: N
Private report: N
New Comment:
Already addressed.
Previous Comments:
------------------------------------------------------------------------
[2010-12-16 11:33:44] smallslime at gmail dot com
Description:
------------
why section 1 is error and section 2 is correct?
Test script:
---------------
section 1:
class p {
public function a() {
echo '123<hr>';
$p = 'this';
return $$p;
}
}
$c = new p();
$c->a();
section 2:
class p {
public function a() {
echo '123<hr>';
$this;
$p = 'this';
return $$p;
}
}
$c = new p();
$c->a();
Expected result:
----------------
i deem section 1 should be no error,while it give me a notice.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53554&edit=1