3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 0 => 'AXA', 1 => 'VHV', 2 => 'TEST', ]; $doctypes = [ 12 => 'AXA', 156 => 'VHV', 8 => 'TEST', ]; $tops = array_map( function (string $name) use ($doctypes) { return in_array($name, $doctypes) ? $name : null; }, $a ); var_dump($tops); exit;
Output for git.master_jit, git.master, rfc.property-hooks
array(3) { [0]=> string(3) "AXA" [1]=> string(3) "VHV" [2]=> string(4) "TEST" }

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