3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contents = "<text>Text element</text><break><list><bullet>Bullet text</bullet></list>"; $tagArray = array( "image" => "img", "title" => "h1", "text" => "p", "break" => "br", "list" => "ul", "subtitle" => "h2", "bullet" => "li", ); $from = array_map(function ($v) { return "#<(/?)$v>#"; }, array_keys($tagArray)); $to = array_map(function ($v) { return "<\$1$v>"; }, $tagArray); echo preg_replace($from, $to, $contents);
Output for git.master, git.master_jit, rfc.property-hooks
<p>Text element</p><br><ul><li>Bullet text</li></ul>

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