3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str="Link type 1 - www.google.com <br>link type 2 - http://www.goe3ogLEe.com <br>link type 3 - https://www.google.com <br>link type 4 - http://google.com <br>Link type 5 - http://www.vistaprint.com/local-search-profile.aspx?txi=15664&xnid=TopNav_Local+Search+Profile+%28linked+item%29_Websites&xnav=TopNav <br>Link type 6 - http://drive.google.com/?tab=mo&authuser=0#folders/0B7ZWeOAbtjQ1OHR1Yf343f33N2M "; $pattern = '#(www\.|https?://)?[\w\d]+\.[\d\w]{2}\S*#i'; $str1=preg_replace($pattern, '<a href="$0">$0</a>', $str); $str1=str_replace('href="www','href="http://www',$str1); echo $str1;
Output for git.master, git.master_jit, rfc.property-hooks
Link type 1 - <a href="http://www.google.com">www.google.com</a> <br>link type 2 - <a href="http://www.goe3ogLEe.com">http://www.goe3ogLEe.com</a> <br>link type 3 - <a href="https://www.google.com">https://www.google.com</a> <br>link type 4 - <a href="http://google.com">http://google.com</a> <br>Link type 5 - <a href="http://www.vistaprint.com/local-search-profile.aspx?txi=15664&xnid=TopNav_Local+Search+Profile+%28linked+item%29_Websites&xnav=TopNav">http://www.vistaprint.com/local-search-profile.aspx?txi=15664&xnid=TopNav_Local+Search+Profile+%28linked+item%29_Websites&xnav=TopNav</a> <br>Link type 6 - <a href="http://drive.google.com/?tab=mo&authuser=0#folders/0B7ZWeOAbtjQ1OHR1Yf343f33N2M">http://drive.google.com/?tab=mo&authuser=0#folders/0B7ZWeOAbtjQ1OHR1Yf343f33N2M</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:
43.01 ms | 402 KiB | 8 Q