note 120076 added to function.list
| From: | anthony dot ossent at live dot fr | Date: | Sun, 23 Oct 2016 03:04:38 +0000 |
| Subject: | note 120076 added to function.list | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206939@lists.php.net to get a copy of this message | ||
a simple example of use to swap two variables :
$a = 'hello';
$b = 'world';
list($a, $b) = [$b, $a];
echo $a . ' ' . $b; //display "world hello"
another example :
function getPosition($x, $y, $z)
{
// ... some operations like $x++...
return [$x, $y, $z];
}
list($x, $y, $z) = getPosition($x ,$y, $z);
----
Server IP: 72.52.91.14
Probable Submitter: 2a01:cb08:44:5400:10e6:3eef:5a0d:e7d9
----
Manual Page -- http://php.net/manual/en/function.list.php
Edit -- https://master.php.net/note/edit/120076
Del: integrated -- https://master.php.net/note/delete/120076/integrated
Del: useless -- https://master.php.net/note/delete/120076/useless
Del: bad code -- https://master.php.net/note/delete/120076/bad+code
Del: spam -- https://master.php.net/note/delete/120076/spam
Del: non-english -- https://master.php.net/note/delete/120076/non-english
Del: in docs -- https://master.php.net/note/delete/120076/in+docs
Del: other reasons-- https://master.php.net/note/delete/120076
Reject -- https://master.php.net/note/reject/120076
Search -- https://master.php.net/manage/user-notes.php