List Info

Thread: note 62405 added to language.references.spot




note 62405 added to language.references.spot
user name
2006-02-27 23:36:54
For the sake of clarity:

$this is a PSEUDO VARIABLE - thus not a real variable. ZE
treats is in other ways then normal variables, and that
means that some advanced variable-things won't work on it
(for obvious reasons):

<?php
class Test {
    var $monkeys = 0;
    
    function doFoobar() {
        $var = "this";
        $$var->monkeys++; // Will fail on this line.
    }
}

$obj = new Test;
$obj->doFoobar(); // Will fail in this call.
var_dump($obj->monkeys); // Will return int(0) if it even
reaches here.
?>
----
Server IP: 129.16.214.50
Probable Submitter: 213.89.140.71
----
X-Spam-Status: No, hits=3.1 required=5.0
tests=DATE_MISSING,FROM_NO_LOWER 
	autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/language.references.spot.p
hp
Edit        -- http://master.p
hp.net/note/edit/62405
Del: integrated  -- ht
tp://master.php.net/note/delete/62405/integrated
Del: useless     -- http:
//master.php.net/note/delete/62405/useless
Del: bad code    -- http
://master.php.net/note/delete/62405/bad+code
Del: spam        -- http://m
aster.php.net/note/delete/62405/spam
Del: non-english -- h
ttp://master.php.net/note/delete/62405/non-english
Del: in docs     -- http:
//master.php.net/note/delete/62405/in+docs
Del: other reasons-- http://master
.php.net/note/delete/62405
Reject      -- http://master
.php.net/note/reject/62405
Search      -- http://ma
ster.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )