3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Array1 = [ 146, 173 ]; $Array2 = [ 'localhost' => [ 'host_id' => 146 ], '192.168.0.43' => [ 'host_id' => 160 ], '192.168.0.38' => [ 'host_id' => 173 ] ]; $filtered_hosts = array_filter($Array2, function($x) use ($Array1) { return in_array($x['host_id'], $Array1); }); print_r($filtered_hosts);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [localhost] => Array ( [host_id] => 146 ) [192.168.0.38] => Array ( [host_id] => 173 ) )

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:
65.71 ms | 401 KiB | 8 Q