note 90590 added to function.list

From: Date: Wed, 29 Apr 2009 17:08:15 +0000
Subject: note 90590 added to function.list
Groups: php.notes 
Request: Send a blank email to php-notes+get-154011@lists.php.net to get a copy of this message
Note that list assigns values from right to left and it does so as soon as it reached argument. $var = array ("test" ,"blah") ; list ($a,$var) = $var; echo $a ; // prints "b" echo $var ; // prints "blah" In this case $var has been assigned new value "blah" before value was assigned to $a. $a was assigned value "b" (I assume string "blah" was converted to an array and $a was assigned first element of that array). ---- Server IP: 72.55.140.6 Probable Submitter: 24.224.130.239 ---- Manual Page -- http://www.php.net/manual/en/function.list.php Edit -- https://master.php.net/note/edit/90590 Del: integrated -- https://master.php.net/note/delete/90590/integrated Del: useless -- https://master.php.net/note/delete/90590/useless Del: bad code -- https://master.php.net/note/delete/90590/bad+code Del: spam -- https://master.php.net/note/delete/90590/spam Del: non-english -- https://master.php.net/note/delete/90590/non-english Del: in docs -- https://master.php.net/note/delete/90590/in+docs Del: other reasons-- https://master.php.net/note/delete/90590 Reject -- https://master.php.net/note/reject/90590 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154011) next »