3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url1 = 'http://usr:pss@example.com:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment'; $url2 = '//usr:pss@example.com:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment'; $url3 = '//example.com/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment'; $url4 = '/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment'; $url5 = 'mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment'; $url6 = '?a=b&b[]=2&b[]=3#myfragment'; $url7 = 'a=b&b[]=2&b[]=3#myfragment'; echo PHP_EOL . ' = ' . var_export(PHP_VERSION, true); echo PHP_EOL . ' = ' . var_export($url1, true); echo PHP_EOL . ' = ' . var_export(parse_url($url1), true); echo PHP_EOL . ' = ' . var_export($url2, true); echo PHP_EOL . ' = ' . var_export(parse_url($url2), true); echo PHP_EOL . ' = ' . var_export($url3, true); echo PHP_EOL . ' = ' . var_export(parse_url($url3), true); echo PHP_EOL . ' = ' . var_export($url4, true); echo PHP_EOL . ' = ' . var_export(parse_url($url4), true); echo PHP_EOL . ' = ' . var_export($url5, true); echo PHP_EOL . ' = ' . var_export(parse_url($url5), true); echo PHP_EOL . ' = ' . var_export($url6, true); echo PHP_EOL . ' = ' . var_export(parse_url($url6), true); echo PHP_EOL . ' = ' . var_export($url7, true); echo PHP_EOL . ' = ' . var_export(parse_url($url7), true);
Output for git.master, git.master_jit, rfc.property-hooks
= '8.3.0-dev' = 'http://usr:pss@example.com:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment' = array ( 'scheme' => 'http', 'host' => 'example.com', 'port' => 81, 'user' => 'usr', 'pass' => 'pss', 'path' => '/mypath/myfile.html', 'query' => 'a=b&b[]=2&b[]=3', 'fragment' => 'myfragment', ) = '//usr:pss@example.com:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment' = array ( 'host' => 'example.com', 'port' => 81, 'user' => 'usr', 'pass' => 'pss', 'path' => '/mypath/myfile.html', 'query' => 'a=b&b[]=2&b[]=3', 'fragment' => 'myfragment', ) = '//example.com/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment' = array ( 'host' => 'example.com', 'path' => '/mypath/myfile.html', 'query' => 'a=b&b[]=2&b[]=3', 'fragment' => 'myfragment', ) = '/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment' = array ( 'path' => '/mypath/myfile.html', 'query' => 'a=b&b[]=2&b[]=3', 'fragment' => 'myfragment', ) = 'mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment' = array ( 'path' => 'mypath/myfile.html', 'query' => 'a=b&b[]=2&b[]=3', 'fragment' => 'myfragment', ) = '?a=b&b[]=2&b[]=3#myfragment' = array ( 'query' => 'a=b&b[]=2&b[]=3', 'fragment' => 'myfragment', ) = 'a=b&b[]=2&b[]=3#myfragment' = array ( 'path' => 'a=b&b[]=2&b[]=3', 'fragment' => 'myfragment', )

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:
43.87 ms | 404 KiB | 8 Q