Now if only when a function returns an array we needn't a variable... function boo(){ return array(1,2,3) } echo boo()[1];
For example:
// explode splits the string on the provided boundary
// and returns an array containing each segment.
// using list() we can assign the two segments to two
// variables within the same statement
$size = "1000x1000";
list( $width, $height ) = explode( "x", $size );