3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array[] = array("name" => "name-1", "value" => "xxx"); $array[] = array("name" => "name-2", "value" => "yyy"); $first_names = array_column($array, 'value', 'name'); print_r($first_names);

preferences:
269.64 ms | 405 KiB | 5 Q