3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<INI_ISH [chorus] And all will surely agree, There's nothing like PHP. [1] It may not be the best way, But it isn't going away. [2] When you don't appear to hack it, Check for a closing bracket. [bridge] Oh, if you don't like this ode, Then please don't look at my code. INI_ISH; preg_match_all( '#^\[([^\]])[^\]]*\]\R\K(?:(?!^\[).)*$#ms', $content, $m ); $map = array_combine($m[1], $m[0]); $map[','] = "\n\n"; $sequence = '1,c,2,c,b,1,c'; echo strtr($sequence, $map);
Output for git.master, git.master_jit
It may not be the best way, But it isn't going away. And all will surely agree, There's nothing like PHP. When you don't appear to hack it, Check for a closing bracket. And all will surely agree, There's nothing like PHP. Oh, if you don't like this ode, Then please don't look at my code. It may not be the best way, But it isn't going away. And all will surely agree, There's nothing like PHP.

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