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'; echo '<pre>' . __FILE__ . '(' . __LINE__ . ')';//zzz echo PHP_EOL . ' = ' . htmlspecialchars(var_export(PHP_VERSION, true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export($url1, true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export(parse_url($url1), true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export($url2, true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export(parse_url($url2), true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export($url3, true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export(parse_url($url3), true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export($url4, true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export(parse_url($url4), true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export($url5, true), 3, 'UTF-8'); echo PHP_EOL . ' = ' . htmlspecialchars(var_export(parse_url($url5), true), 3, 'UTF-8'); echo '</pre>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre>/in/oCo9j(8) = &#039;8.3.0-dev&#039; = &#039;http://usr:pss@example.com:81/mypath/myfile.html?a=b&amp;b[]=2&amp;b[]=3#myfragment&#039; = array ( &#039;scheme&#039; =&gt; &#039;http&#039;, &#039;host&#039; =&gt; &#039;example.com&#039;, &#039;port&#039; =&gt; 81, &#039;user&#039; =&gt; &#039;usr&#039;, &#039;pass&#039; =&gt; &#039;pss&#039;, &#039;path&#039; =&gt; &#039;/mypath/myfile.html&#039;, &#039;query&#039; =&gt; &#039;a=b&amp;b[]=2&amp;b[]=3&#039;, &#039;fragment&#039; =&gt; &#039;myfragment&#039;, ) = &#039;//usr:pss@example.com:81/mypath/myfile.html?a=b&amp;b[]=2&amp;b[]=3#myfragment&#039; = array ( &#039;host&#039; =&gt; &#039;example.com&#039;, &#039;port&#039; =&gt; 81, &#039;user&#039; =&gt; &#039;usr&#039;, &#039;pass&#039; =&gt; &#039;pss&#039;, &#039;path&#039; =&gt; &#039;/mypath/myfile.html&#039;, &#039;query&#039; =&gt; &#039;a=b&amp;b[]=2&amp;b[]=3&#039;, &#039;fragment&#039; =&gt; &#039;myfragment&#039;, ) = &#039;//example.com/mypath/myfile.html?a=b&amp;b[]=2&amp;b[]=3#myfragment&#039; = array ( &#039;host&#039; =&gt; &#039;example.com&#039;, &#039;path&#039; =&gt; &#039;/mypath/myfile.html&#039;, &#039;query&#039; =&gt; &#039;a=b&amp;b[]=2&amp;b[]=3&#039;, &#039;fragment&#039; =&gt; &#039;myfragment&#039;, ) = &#039;/mypath/myfile.html?a=b&amp;b[]=2&amp;b[]=3#myfragment&#039; = array ( &#039;path&#039; =&gt; &#039;/mypath/myfile.html&#039;, &#039;query&#039; =&gt; &#039;a=b&amp;b[]=2&amp;b[]=3&#039;, &#039;fragment&#039; =&gt; &#039;myfragment&#039;, ) = &#039;mypath/myfile.html?a=b&amp;b[]=2&amp;b[]=3#myfragment&#039; = array ( &#039;path&#039; =&gt; &#039;mypath/myfile.html&#039;, &#039;query&#039; =&gt; &#039;a=b&amp;b[]=2&amp;b[]=3&#039;, &#039;fragment&#039; =&gt; &#039;myfragment&#039;, )</pre>

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:
39.56 ms | 405 KiB | 8 Q