note 78432 added to language.oop5.visibility
| From: | phpdoc at povaddict dot com dot ar | Date: | Thu, 11 Oct 2007 19:52:57 +0000 |
| Subject: | note 78432 added to language.oop5.visibility | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131311@lists.php.net to get a copy of this message | ||
Re: ference at super_delete_brose dot co dot uk
"If eval() is the answer, youâre almost certainly asking the wrong question."
<?php
eval('$result = $this->'.$var.';'); //wrong
$result = $this->$var; //right way
$var = "foo";
$this->var = "this will assign to member called 'var'.";
$this->$var = "this will assign to member called 'foo'.";
?>
----
Server IP: 190.2.55.3
Probable Submitter: 190.188.180.157
----
Manual Page -- http://www.php.net/manual/en/language.oop5.visibility.php
Edit -- https://master.php.net/note/edit/78432
Del: integrated -- https://master.php.net/note/delete/78432/integrated
Del: useless -- https://master.php.net/note/delete/78432/useless
Del: bad code -- https://master.php.net/note/delete/78432/bad+code
Del: spam -- https://master.php.net/note/delete/78432/spam
Del: non-english -- https://master.php.net/note/delete/78432/non-english
Del: in docs -- https://master.php.net/note/delete/78432/in+docs
Del: other reasons-- https://master.php.net/note/delete/78432
Reject -- https://master.php.net/note/reject/78432
Search -- https://master.php.net/manage/user-notes.php