note 83658 added to language.variables.variable

From: Date: Fri, 06 Jun 2008 07:43:03 +0000
Subject: note 83658 added to language.variables.variable
Groups: php.notes 
Request: Send a blank email to php-notes+get-140168@lists.php.net to get a copy of this message
It's also valuable to note the following: <?php ${date("M")} = "Worked"; echo ${date("M")}; ?> This is perfectly legal, anything inside the braces is executed first, the return value then becomes the variable name. Echoing the same variable variable using the function that created it results in the same return and therefore the same variable name is used in the echo statement. Have fun ;). ---- Server IP: 117.104.160.194 Probable Submitter: 124.185.84.113 ---- Manual Page -- http://www.php.net/manual/en/language.variables.variable.php Edit -- https://master.php.net/note/edit/83658 Del: integrated -- https://master.php.net/note/delete/83658/integrated Del: useless -- https://master.php.net/note/delete/83658/useless Del: bad code -- https://master.php.net/note/delete/83658/bad+code Del: spam -- https://master.php.net/note/delete/83658/spam Del: non-english -- https://master.php.net/note/delete/83658/non-english Del: in docs -- https://master.php.net/note/delete/83658/in+docs Del: other reasons-- https://master.php.net/note/delete/83658 Reject -- https://master.php.net/note/reject/83658 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140168) next »