✔ Keys in list Assignment


<?php
$points = [
    [ "x" => 1, "y" => 2, "z" => 4 ],
    [ "x" => 2, "y" => 1 ],
];
 
foreach ( $points as list( "x" => $x, "y" => $y ) )
{
    echo "Point at ($x, $y)", PHP_EOL;
}
?>