3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $urls = array("/category/category.html", "http://google.com"); foreach($urls as $url) { $res = parse_url($url); if(!isset($res['host'])) { echo "$url is a relative URL"; } else { echo "$url is a absolute URL"; } }
Output for 4.3.0 - 7.1.0
/category/category.html is a relative URLhttp://google.com is a absolute URL