3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 20; $a = function ($n) { return 10 * floor($n / 4); }; $b = function ($n) { return 2 ** ($n % 4); }; $values = []; for ($n = 0; $input >= $value = $a($n) + $b($n) ; ++$n) { $values[] = $value; } echo implode(' ', $values);
Output for git.master, git.master_jit, rfc.property-hooks
1 2 4 8 11 12 14 18

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:
118.17 ms | 405 KiB | 5 Q