3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uri = 'https://www.algo.com/algo/algomas'; $parsed_uri = parse_url($uri); $rebuilt_host_part = ($parsed_uri['user'] ? $parsed_uri['user'] : '') . ($parsed_uri['pass'] ? ':'.$parsed_uri['pass'] : '') . ($parsed_uri['user'] ? '@' : '') . $parsed_uri['host'] . ($parsed_uri['port'] ? ':'.$parsed_uri['port'] : ''); $random = '_='.random_string('alnum', 3); $parsed_uri['fragment'] .= $parsed_uri['fragment'] ? '&'.$random : $random; $rebuilt_uri = sprintf('%s://%s%s%s', $parsed_uri['scheme'], $rebuilt_host_part, $parsed_uri['path'], $parsed_uri['query'] ? '?'.$parsed_uri['query'] : '', $parsed_uri['fragment'] ? '#'.$parsed_uri['fragment'] : ''); $uri = $rebuilt_uri; echo $uri;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "user" in /in/nes2n on line 8 Warning: Undefined array key "pass" in /in/nes2n on line 9 Warning: Undefined array key "user" in /in/nes2n on line 10 Warning: Undefined array key "port" in /in/nes2n on line 12 Fatal error: Uncaught Error: Call to undefined function random_string() in /in/nes2n:14 Stack trace: #0 {main} thrown in /in/nes2n on line 14
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:
59.82 ms | 401 KiB | 8 Q