Edit report at http://bugs.php.net/bug.php?id=53554&edit=1

 ID:                 53554
 Updated by:         [email protected]
 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

Reply via email to