3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(text)(?!<\/a>)/m'; $str = 'this is sample text about something what is text. this is sample <a href=\'somelink.php\'>text</a> about something what is <a href=\'somelink.php\'>text</a>.'; $subst = '<a href=\'somelink.php\'>$1</a>'; $result = preg_replace($re, $subst, $str); echo $result;
Output for git.master, git.master_jit, rfc.property-hooks
this is sample <a href='somelink.php'>text</a> about something what is <a href='somelink.php'>text</a>. this is sample <a href='somelink.php'>text</a> about something what is <a href='somelink.php'>text</a>.

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