With/from PHP 7.1:
For keyed arrays;
$array = ['fruit1' => 'apple', 'fruit2' => 'orange'];
// [] style
['fruit1' => $fruit1, 'fruit2' => $fruit2] = $array;
// list() style
list('fruit1' => $fruit1, 'fruit2' => $fruit2) = $array;
echo $fruit1; // apple
For unkeyed arrays;
$array = ['apple', 'orange'];
// [] style
[$fruit1, $fruit2] = $array;
// list() style
list($fruit1, $fruit2) = $array;
echo $fruit1; // apple
Note: use []
style if possible by version, maybe list goes a new type in the future, who knows…