3v4l.org

run code in 300+ PHP versions simultaneously
<?php const URLS = [ "http://site.com/", "http://site.com/save", "http://site.com/save/results", "http://site.com/save/results/path", "http://site.com/path/save/results", "http://site.com/save/path", "http://site.com/path/results", "http://site.com/Crawler4", "http://site.com/Crawler", ]; $seen = []; $siteStructure = []; foreach (URLS as $url) { ['scheme' => $scheme, 'host' => $host, 'path' => $path] = parse_url($url); $realm = $scheme . '://' . $host; $siteStructure[$realm] = isset($siteStructure[$realm]) ? $siteStructure[$realm]: []; $current = &$siteStructure[$realm]; $pathEls = preg_split('/[^a-zA-Z0-9]+/', $path, 0, PREG_SPLIT_NO_EMPTY); foreach ($pathEls as $el) { $current[$el] = isset($current[$el]) ? $current[$el] : []; $current = &$current[$el]; } unset($current); } var_dump($siteStructure);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0160.00616.88
8.3.50.0160.00616.75
8.3.40.0120.00319.22
8.3.30.0070.00719.10
8.3.20.0050.00224.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.180.0140.00425.92
8.2.170.0040.01218.89
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0060.00326.16
8.2.120.0000.00826.35
8.2.110.0090.00022.25
8.2.100.0120.00017.84
8.2.90.0060.00319.17
8.2.80.0060.00318.00
8.2.70.0000.00818.16
8.2.60.0080.00318.09
8.2.50.0000.00818.10
8.2.40.0030.00720.96
8.2.30.0000.00819.36
8.2.20.0040.00418.05
8.2.10.0040.00421.05
8.2.00.0040.00419.40
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0080.00028.09
8.1.250.0000.00828.09
8.1.240.0030.00622.05
8.1.230.0090.00317.77
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0000.01017.60
8.1.190.0060.00317.48
8.1.180.0030.00618.10
8.1.170.0040.00418.75
8.1.160.0050.00219.03
8.1.150.0000.00718.85
8.1.140.0040.00418.91
8.1.130.0000.00717.65
8.1.120.0000.00817.53
8.1.110.0040.00417.64
8.1.100.0000.00717.47
8.1.90.0000.00717.60
8.1.80.0040.00417.59
8.1.70.0000.00817.57
8.1.60.0060.00317.66
8.1.50.0030.00617.66
8.1.40.0030.00617.68
8.1.30.0050.00317.70
8.1.20.0000.00917.80
8.1.10.0040.00417.63
8.1.00.0000.00817.57
8.0.300.0000.00818.77
8.0.290.0050.00316.88
8.0.280.0070.00018.54
8.0.270.0070.00016.91
8.0.260.0000.00716.84
8.0.250.0060.00317.02
8.0.240.0000.00716.99
8.0.230.0030.00317.00
8.0.220.0000.00716.93
8.0.210.0030.00316.93
8.0.200.0040.00416.97
8.0.190.0040.00417.12
8.0.180.0070.00017.07
8.0.170.0030.00716.94
8.0.160.0070.00017.08
8.0.150.0000.00717.02
8.0.140.0000.00717.02
8.0.130.0000.00613.46
8.0.120.0060.00316.93
8.0.110.0060.00316.94
8.0.100.0040.00417.09
8.0.90.0000.00717.00
8.0.80.0110.01117.02
8.0.70.0000.00717.06
8.0.60.0040.00416.90
8.0.50.0000.00817.02
8.0.30.0120.01217.54
8.0.20.0100.01017.01
8.0.10.0090.00917.16
8.0.00.0100.01017.32
7.4.330.0050.00015.55
7.4.320.0030.00316.79
7.4.300.0050.00216.77
7.4.290.0000.00716.76
7.4.280.0080.00416.85
7.4.270.0000.01116.65
7.4.260.0030.00313.48
7.4.250.0070.00016.68
7.4.240.0000.00716.86
7.4.230.0000.00716.81
7.4.220.0030.00316.70
7.4.210.0070.01016.80
7.4.200.0040.00416.74
7.4.140.0160.01116.61
7.4.130.0100.00716.47
7.4.120.0070.01116.58
7.4.110.0120.00616.60
7.4.100.0090.00916.67
7.4.90.0060.01216.64
7.4.80.0080.01216.74
7.4.70.0110.00716.52
7.4.60.0120.00616.63
7.4.50.0070.01116.41
7.4.40.0070.01116.54
7.4.30.0080.01116.52
7.4.20.0100.00716.55
7.4.10.0070.01016.64
7.4.00.0100.01016.59
7.3.330.0070.00016.36
7.3.320.0060.00013.39
7.3.310.0000.00716.47
7.3.300.0000.00816.45
7.3.290.0080.00716.47
7.3.260.0110.00716.49
7.3.250.0130.00616.75
7.3.240.0080.01116.57
7.3.230.0160.00316.24
7.3.220.0100.00716.50
7.3.210.0120.00616.70
7.3.200.0090.00916.67
7.3.190.0150.00416.67
7.3.180.0140.00316.45
7.3.170.0130.00316.26
7.3.160.0140.00416.51
7.3.150.0090.00916.59
7.3.140.0060.01316.43
7.3.130.0090.00916.50
7.3.120.0130.00716.61
7.3.110.0090.01316.50
7.3.100.0150.00316.55
7.3.90.0120.00616.63
7.3.80.0110.00716.78
7.3.70.0160.00916.57
7.3.60.0090.00916.49
7.3.50.0090.01616.58
7.3.40.0160.00316.41
7.3.30.0220.00316.45
7.3.20.0120.01216.44
7.3.10.0140.01116.41
7.3.00.0150.00416.51

preferences:
54.06 ms | 400 KiB | 5 Q