3v4l.org

run code in 300+ PHP versions simultaneously
<?php function depbuild($name, $location, $suffix, $locale) { $locales = $locale ? array($locale, null) : array(null); $extensions = array_filter(array( ($location && $suffix) ? implode('-', array($location, $suffix)) : null, $suffix ?: null, $location ?: null, )); $extensions[] = null; $routing = array(); foreach ($locales as $lang) { foreach ($extensions as $extension) { echo implode('-', array_filter(array( $name, $extension, $lang, ))) . '.html'.PHP_EOL; } } } $name = 'foo'; $location = array(null, 'GL', 'AS'); $suffix = array(null, 'P','C'); $locale = array(null, 'fr_FR'); foreach($location as $loc) { foreach($suffix as $s) { foreach($locale as $l) { depbuild($name, $loc, $s, $l); echo PHP_EOL.'--------'.PHP_EOL; } } }
Output for git.master, git.master_jit, rfc.property-hooks
foo.html -------- foo-fr_FR.html foo.html -------- foo-P.html foo.html -------- foo-P-fr_FR.html foo-fr_FR.html foo-P.html foo.html -------- foo-C.html foo.html -------- foo-C-fr_FR.html foo-fr_FR.html foo-C.html foo.html -------- foo-GL.html foo.html -------- foo-GL-fr_FR.html foo-fr_FR.html foo-GL.html foo.html -------- foo-GL-P.html foo-P.html foo-GL.html foo.html -------- foo-GL-P-fr_FR.html foo-P-fr_FR.html foo-GL-fr_FR.html foo-fr_FR.html foo-GL-P.html foo-P.html foo-GL.html foo.html -------- foo-GL-C.html foo-C.html foo-GL.html foo.html -------- foo-GL-C-fr_FR.html foo-C-fr_FR.html foo-GL-fr_FR.html foo-fr_FR.html foo-GL-C.html foo-C.html foo-GL.html foo.html -------- foo-AS.html foo.html -------- foo-AS-fr_FR.html foo-fr_FR.html foo-AS.html foo.html -------- foo-AS-P.html foo-P.html foo-AS.html foo.html -------- foo-AS-P-fr_FR.html foo-P-fr_FR.html foo-AS-fr_FR.html foo-fr_FR.html foo-AS-P.html foo-P.html foo-AS.html foo.html -------- foo-AS-C.html foo-C.html foo-AS.html foo.html -------- foo-AS-C-fr_FR.html foo-C-fr_FR.html foo-AS-fr_FR.html foo-fr_FR.html foo-AS-C.html foo-C.html foo-AS.html foo.html --------

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:
43.65 ms | 403 KiB | 8 Q