PHP 8.4.24 Released!

Voting

: max(seven, two)?
(Example: nine)

The Note You're Voting On

anthony dot ossent at live dot fr
9 years ago
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);

<< Back to user notes page

To Top