3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = null; $parsed = parse_url($url); var_dump($parsed); $url = ''; $parsed = parse_url($url); var_dump($parsed);
based on 4O1rg
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
array(1) { ["path"]=> string(0) "" } array(1) { ["path"]=> string(0) "" }
Output for hhvm-3.15.4
Warning: parse_url() expects parameter 1 to be string, null given in /in/9pIMS on line 4 NULL array(1) { ["path"]=> string(0) "" }