3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); /** * @param array $elements * * @return Generator */ function gen2(array $elements): \Generator { for ($num = count($elements), $i = pow(2, $num) - 1; $i >= 1; $i -= 2) { $r = []; for ($j = 0; $j < $num; $j += 1) { if ($i & (1 << ($num - $j - 1))) { $r[] = $elements[$j]; } } yield $r; } } foreach (gen2(['O', 'U', 'W', 'P', 'template']) as $path) { echo implode(' / ', $path), "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
O / U / W / P / template O / U / W / template O / U / P / template O / U / template O / W / P / template O / W / template O / P / template O / template U / W / P / template U / W / template U / P / template U / template W / P / template W / template P / template template

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