3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "https://lh4.googleusercontent.com/-vi8qjz0rz4o/AAAAAAAAAAI/AAAAAAAAaz4/vTzzYBQSL5M/photo.jpg?sz=200"; $parsedUrl = parse_url($url); var_dump($parsedUrl); if ($parsedUrl !== false && is_array($parsedUrl)) { $parsedUrl .= "://"; unset($parsedUrl['query']); unset($parsedUrl['fragment']); $url = implode('', $parsedUrl); } var_dump($url);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { ["scheme"]=> string(5) "https" ["host"]=> string(25) "lh4.googleusercontent.com" ["path"]=> string(59) "/-vi8qjz0rz4o/AAAAAAAAAAI/AAAAAAAAaz4/vTzzYBQSL5M/photo.jpg" ["query"]=> string(6) "sz=200" } Warning: Array to string conversion in /in/91Iuv on line 7 Fatal error: Uncaught Error: Cannot unset string offsets in /in/91Iuv:8 Stack trace: #0 {main} thrown in /in/91Iuv on line 8
Process exited with code 255.

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:
58.72 ms | 401 KiB | 8 Q