3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "http://sumiyoshi22.jp/", "https://www.finecity138.jp/", "http://www.hirakata-p.jp/", "http://www.honki-pj.com/", "http://nishitetsu-sumai.com/centermarkstower/index.html", "http://senri100.jp/index.html" ]; foreach ($array as $url) { $parts = parse_url($url); $scheme = $parts["scheme"]; $host = $parts["host"]; $path = dirname($parts["path"]) ?? ''; if (in_array($host, ["www.finecity138.jp", "nishitetsu-sumai.com"])) { $path .= ($path == "/" ? "" : "/") . "outline.html"; } else { $path .= "outline"; } $output[] = "{$scheme}://{$host}{$path}"; } var_export($output);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'http://sumiyoshi22.jp/outline', 1 => 'https://www.finecity138.jp/outline.html', 2 => 'http://www.hirakata-p.jp/outline', 3 => 'http://www.honki-pj.com/outline', 4 => 'http://nishitetsu-sumai.com/centermarkstower/outline.html', 5 => 'http://senri100.jp/outline', )

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:
197.17 ms | 406 KiB | 5 Q