3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array_flip(['foo_bar', 'foo_baz', 'foo_bat', 'bar_baz', 'bar_bat', 'bat_bat']); var_export($array); echo "\n"; var_export(array_filter($array, function($k) { return strpos($k, "_bat") !== FALSE; }, ARRAY_FILTER_USE_KEY));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'foo_bar' => 0, 'foo_baz' => 1, 'foo_bat' => 2, 'bar_baz' => 3, 'bar_bat' => 4, 'bat_bat' => 5, ) array ( 'foo_bat' => 2, 'bar_bat' => 4, 'bat_bat' => 5, )

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