3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string!'; $i = 0; var_dump(array_filter(str_split($string), function($val) use ($i) { return ++$i % 2; }));
Output for git.master, git.master_jit, rfc.property-hooks
array(17) { [0]=> string(1) "T" [1]=> string(1) "h" [2]=> string(1) "i" [3]=> string(1) "s" [4]=> string(1) " " [5]=> string(1) "i" [6]=> string(1) "s" [7]=> string(1) " " [8]=> string(1) "a" [9]=> string(1) " " [10]=> string(1) "s" [11]=> string(1) "t" [12]=> string(1) "r" [13]=> string(1) "i" [14]=> string(1) "n" [15]=> string(1) "g" [16]=> string(1) "!" }

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:
53.05 ms | 402 KiB | 8 Q