3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<HTML <p>my text 1</p> some other content <p>some other paragraph followed by an html line break</p><br> etc... HTML; $string = preg_replace('~</?[a-z]+>\R(*SKIP)(*FAIL)|$~m', '<br>', $string); var_export($string); echo "\n----\n"; var_export(json_encode($string));
Output for git.master, git.master_jit, rfc.property-hooks
'<p>my text 1</p> some other content<br> <p>some other paragraph followed by an html line break</p><br> etc...<br>' ---- '"<p>my text 1<\\/p>\\nsome other content<br>\\n<p>some other paragraph followed by an html line break<\\/p><br>\\netc...<br>"'

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