3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0 => ['id' => 'one', 'fruit' => 'apple'], 1 => ['id' => 'two', 'fruit' => 'banana']]; var_export(array_column($arr, null, 'id'));

preferences:
41.99 ms | 405 KiB | 5 Q