3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits_arr = [ ['id' => 213, 'fruit' => 'banana'], ['id' => 438, 'fruit' => 'apple'], ['id' => 154, 'fruit' => 'peach'] ]; $ids_arr = [213, 154]; var_export(array_intersect_key(array_column($fruits_arr, null, "id"), array_flip($ids_arr)));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 213 => array ( 'id' => 213, 'fruit' => 'banana', ), 154 => array ( 'id' => 154, 'fruit' => 'peach', ), )

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.74 ms | 401 KiB | 8 Q