3v4l.org

run code in 300+ PHP versions simultaneously
<?php $reg_exUrl = "/(http|https|ftp|ftps|www)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; $text = 'lol www.google.bg is an awesome website;'; if(preg_match($reg_exUrl, $text, $url)) { // make the urls hyper links $new_text = preg_replace($reg_exUrl, '<a href="'.$url[0].'">'.$url[0].'</a> ', $text); } else { // if no urls in the text just return the text echo $text; } echo $new_text;
Output for git.master, git.master_jit, rfc.property-hooks
lol www.google.bg is an awesome website; Warning: Undefined variable $new_text in /in/4uvmr on line 15

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:
40.07 ms | 401 KiB | 8 Q