3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = ["one", "two", "three"]; $ignore = "two"; array_filter($items, function($item) { return $item !== $ignore; }); // ---- Now let's do it properly var_dump(array_filter($items, function($item) use ($ignore) { return $item !== $ignore; }));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $ignore in /in/skQbI on line 7 Warning: Undefined variable $ignore in /in/skQbI on line 7 Warning: Undefined variable $ignore in /in/skQbI on line 7 array(2) { [0]=> string(3) "one" [2]=> string(5) "three" }

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:
56.66 ms | 406 KiB | 5 Q