3v4l.org

run code in 300+ PHP versions simultaneously
<?php $houses = [ ['id' => 332, 'title' => 'biba'], ['id' => 2222, 'title' => 'boba'], ['id' => 5566, 'title' => 'aboba'], ]; $result = array_map( fn(array $item) => [$item['id'] => $item['title']], $houses ); print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [332] => biba ) [1] => Array ( [2222] => boba ) [2] => Array ( [5566] => aboba ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
32.3 ms | 405 KiB | 5 Q