3v4l.org

run code in 300+ PHP versions simultaneously
<?php $palette = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']; $count = count($palette); echo preg_replace_callback( '~\PZ~u', function ($m) use($palette, $count) { static $i = 0; return sprintf('<span style="color:%s">%s</span>', $palette[$i++ % $count], $m[0]); }, 'Stack Overflow volunteerism' );
Output for git.master, git.master_jit, rfc.property-hooks
<span style="color:red">S</span><span style="color:orange">t</span><span style="color:yellow">a</span><span style="color:green">c</span><span style="color:blue">k</span> <span style="color:indigo">O</span><span style="color:violet">v</span><span style="color:red">e</span><span style="color:orange">r</span><span style="color:yellow">f</span><span style="color:green">l</span><span style="color:blue">o</span><span style="color:indigo">w</span> <span style="color:violet">v</span><span style="color:red">o</span><span style="color:orange">l</span><span style="color:yellow">u</span><span style="color:green">n</span><span style="color:blue">t</span><span style="color:indigo">e</span><span style="color:violet">e</span><span style="color:red">r</span><span style="color:orange">i</span><span style="color:yellow">s</span><span style="color:green">m</span>

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:
123.92 ms | 1564 KiB | 4 Q