3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://www.example.com#fra/gment'; echo $url . "\n"; var_dump(parse_url($url)); $url = 'http://www.example.com?p=1/param'; echo $url . "\n"; var_dump(parse_url($url)); // No host, should return false $url = 'http://#fra/gment'; echo $url . "\n"; var_dump(parse_url($url)); // No host, should return false $url = 'http://?p=1/param'; echo $url . "\n"; var_dump(parse_url($url));
Output for git.master, git.master_jit, rfc.property-hooks
http://www.example.com#fra/gment array(3) { ["scheme"]=> string(4) "http" ["host"]=> string(15) "www.example.com" ["fragment"]=> string(9) "fra/gment" } http://www.example.com?p=1/param array(3) { ["scheme"]=> string(4) "http" ["host"]=> string(15) "www.example.com" ["query"]=> string(9) "p=1/param" } http://#fra/gment bool(false) http://?p=1/param bool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
64.02 ms | 402 KiB | 8 Q