3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '§f§lWORDHERE'; $replacements = [ '§f' => '<span style="color: white;">$0</span>', '§l' => '<b>$0</b>', ]; if (preg_match('/^(?<flags>(?:§[a-z])+)(?<string>.*)/iu', $str, $matches)) { $str_res = $matches['string']; foreach (mb_str_split($matches['flags'], 2) as $flag) { $str_res = preg_replace('/.+/', $replacements[$flag], $str_res); } echo $str_res; }
Output for git.master, git.master_jit, rfc.property-hooks
<b><span style="color: white;">WORDHERE</span></b>

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