ID:               49331
 Updated by:       j...@php.net
 Reported By:      shenk...@php.net
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: win7
 PHP Version:      5.3.0
 New Comment:

See bug #47409, and next time: SEARCH BEFORE REPORTING SAME SHIT AGAIN!
You haven't really earned the right to use @php.net address..


Previous Comments:
------------------------------------------------------------------------

[2009-08-22 16:36:50] shenk...@php.net

class B {
    public function test1() {
        echo 'b';
    }
}
class A {
    public function test($arr) {
        extract($arr);
        var_dump($this);
        $this->test1();
    }
    public function test1() {
        echo 'a';
    }
}
$a = new A;
$b = new B;
$arr['this'] = $b;
$a->test($arr);

-----
object(B)#2 (0) {
}
a

------------------------------------------------------------------------

[2009-08-22 16:23:11] shenk...@php.net

Description:
------------
class A {
    public function test() {
        var_dump($this);
        $this = 'oh, mygod';
        var_dump($this);
    }
}
$a = new A;
$a->test();

Fatal error: Cannot re-assign $this in D:\www\testthis.php on line 13


Reproduce code:
---------------
class A {
    public function test($arr) {
        var_dump($this);
        extract($arr);
        var_dump($this);
    }
}
$a = new A;
$arr['this'] = 'abc';
$a->test($arr);



Expected result:
----------------
Fatal error: Cannot re-assign $this in D:\www\testthis.php on line 13


Actual result:
--------------
it's ok!


------------------------------------------------------------------------


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

Reply via email to