ID:               47409
 User updated by:  niximor at gmail dot com
 Reported By:      niximor at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Windows Vista
-PHP Version:      5.2.9RC2
+PHP Version:      5.2.9RC4-dev
 New Comment:

With latest version downloaded just now (5.2.9RC4-dev) same result as
with RC2 (Test1::name = test2).


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

[2009-02-21 19:03:23] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



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

[2009-02-16 18:48:50] niximor at gmail dot com

Description:
------------
When I use extract() with array, that contains key "this", it behaves
really weird. See code for more info.

Reproduce code:
---------------
class Test1 {
        var $name = "test1";
}

class Test2 {
        var $name = "test2";

        function bug() {
                extract(array("this"=>new Test1()), EXTR_OVERWRITE | EXTR_REFS);
                echo get_class($this)."::name = ".$this->name;
        }
}

$t = new Test2();
$t->bug();


Expected result:
----------------
Test1::name = test1 (preferably)
OR
Test2::name = test2
- not combination of both.

Actual result:
--------------
Test1::name = test2


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


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

Reply via email to