3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print "omg"; $parts = parse_url("http://134744072\x00@1.2.3.4/btc.txt"); print "meh"; print_r($parts); print "wah"; $hosts = gethostbynamel($parts['host']); print_r($hosts); echo bin2hex($parts["user"]); print "wtf"; ?>
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.21, 7.0.0 - 7.0.6, 7.0.20 - 7.3.0rc4
omgmehArray ( [scheme] => http [host] => 1.2.3.4 [user] => 134744072_ [path] => /btc.txt ) wahArray ( [0] => 1.2.3.4 ) 3133343734343037325fwtf
Output for 5.6.28, 7.0.14
omgmehArray ( [scheme] => http [host] => 134744072 [path] => _@1.2.3.4/btc.txt ) wahArray ( [0] => 8.8.8.8 ) Notice: Undefined index: user in /in/75U82 on line 10 wtf
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
omgmehArray ( [scheme] => http [host] => 134744072 ) wahArray ( [0] => 8.8.8.8 ) Notice: Undefined index: user in /in/75U82 on line 10 wtf