3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 's://www.google.co.m'; if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { $url = "http://" . $url; } print_R($url);
based on 5j12A
Output for 4.3.0 - 7.1.0
http://s://www.google.co.m