note 107293 added to functions.variable-functions

From: Date: Sat, 28 Jan 2012 02:59:52 +0000
Subject: note 107293 added to functions.variable-functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-185772@lists.php.net to get a copy of this message
You can also use VV's on classes, not just variables. <?php class test { public $data=''; function __construct() { $this->data='ok'; }I } $testClass='test'; $test=new $testClass(); echo $test->data; ?> returns "ok" Which is pretty cool and proving REALLY handy in some code I'm writing right now. ---- Server IP: 69.147.83.197 Probable Submitter: 74.78.113.205 ---- Manual Page -- http://www.php.net/manual/en/functions.variable-functions.php Edit -- https://master.php.net/note/edit/107293 Del: integrated -- https://master.php.net/note/delete/107293/integrated Del: useless -- https://master.php.net/note/delete/107293/useless Del: bad code -- https://master.php.net/note/delete/107293/bad+code Del: spam -- https://master.php.net/note/delete/107293/spam Del: non-english -- https://master.php.net/note/delete/107293/non-english Del: in docs -- https://master.php.net/note/delete/107293/in+docs Del: other reasons-- https://master.php.net/note/delete/107293 Reject -- https://master.php.net/note/reject/107293 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185772) next »