3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'key' => 'foo', 'key2' => 'bar', 0 => 'num_foo', 1 => 'num_bar' ); $new_array = array_filter ($arr, function($key) { return is_int($key); }, ARRAY_FILTER_USE_KEY); var_dump($new_array);
Output for git.master_jit, git.master, rfc.property-hooks
array(2) { [0]=> string(7) "num_foo" [1]=> string(7) "num_bar" }

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:
37.16 ms | 405 KiB | 9 Q