3v4l.org

run code in 300+ PHP versions simultaneously
<?php function combinaisons($chaine, $prefix = '') { if(strlen($chaine) == strlen($prefix)) { yield $prefix; return; } $caracteres = str_split($chaine, 1); foreach($caracteres as $caractere) { $solutions = combinaisons($chaine, $prefix.$caractere); foreach($solutions as $solution) yield $solution; } } $combinaisons = combinaisons('abc', 4); foreach($combinaisons as $combinaison) echo $combinaison.'\n';
Output for git.master, git.master_jit, rfc.property-hooks
4aa\n4ab\n4ac\n4ba\n4bb\n4bc\n4ca\n4cb\n4cc\n

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:
37.56 ms | 401 KiB | 8 Q