3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'red', ' ', 'blue', ' ', '', 'green ', ' ', 'white', ' ', 'black', ' ', ]; var_export(array_filter($array, fn($v) => !ctype_space($v))); echo "\n---\n"; var_export(preg_grep('/^\s+$/', $array, PREG_GREP_INVERT));
Output for rfc.property-hooks, git.master, git.master_jit
array ( 0 => 'red', 2 => 'blue', 4 => '', 5 => 'green ', 7 => 'white', 9 => 'black', ) --- array ( 0 => 'red', 2 => 'blue', 4 => '', 5 => 'green ', 7 => 'white', 9 => 'black', )

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.32 ms | 1137 KiB | 4 Q