1function getXYZ()
2{
3 return array(4,5,6);
4}
5
6list($x,$y,$z) = getXYZ();
7
8// Afterwards: $x == 4 && $y == 5 && $z == 6
9// (This will hold for all samples unless otherwise noted)
1// Function to swap two numbers
2function swap( $x, $y ) {
3 return array( $y, $x );
4}