3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<JSON [ [ 51.11041991029261, -2.274169921875 ], [ 51.08282186160978, -3.460693359375 ], [ 50.443513052458044, -3.570556640625 ], [ 50.443513052458044, -1.966552734375 ] ] JSON; $coords = json_decode($json, true); $lats = array_column($coords, 0); $lons = array_column($coords, 1); var_dump($lats, $lons);

preferences:
36.72 ms | 402 KiB | 5 Q