3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = "http://www.mydomain.com/q?filter=test"; $url= preg_replace("|^[htps]+://|", "", $url); $url= preg_replace("|^www\.|", "", $url); $url= preg_replace("|[\/:\?].*$|", "", $url); echo($url);
based on 4sapu
Output for 5.3.19 - 7.2.0
mydomain.com