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] ??= []; $current = &$siteStructure[$realm]; $pathEls = preg_split('/[^a-zA-Z0-9]+/', $path, 0, PREG_SPLIT_NO_EMPTY); foreach ($pathEls as $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.0120.00916.63
8.3.50.0150.00616.71
8.3.40.0130.00319.27
8.3.30.0070.01119.14
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0000.00826.16
8.2.180.0090.01325.92
8.2.170.0120.00419.11
8.2.160.0070.00722.96
8.2.150.0050.00325.66
8.2.140.0000.00824.66
8.2.130.0070.00326.16
8.2.120.0080.00020.97
8.2.110.0080.00321.00
8.2.100.0060.00618.03
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0030.00517.93
8.2.60.0040.00418.05
8.2.50.0040.00418.05
8.2.40.0000.00718.16
8.2.30.0090.00018.14
8.2.20.0030.00518.21
8.2.10.0050.00319.26
8.2.00.0070.00019.38
8.1.280.0070.01425.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0070.00323.95
8.1.230.0080.00417.77
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0040.00417.48
8.1.190.0040.00717.48
8.1.180.0080.00018.10
8.1.170.0000.00918.61
8.1.160.0030.00618.96
8.1.150.0000.00718.87
8.1.140.0000.00718.96
8.1.130.0030.00320.07
8.1.120.0000.00717.58
8.1.110.0040.00417.67
8.1.100.0000.00717.67
8.1.90.0000.00817.61
8.1.80.0000.00917.68
8.1.70.0040.00417.63
8.1.60.0030.00517.71
8.1.50.0040.00417.68
8.1.40.0000.00917.71
8.1.30.0030.00517.72
8.1.20.0020.00517.82
8.1.10.0080.00017.70
8.1.00.0030.00617.56
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00318.51
8.0.270.0040.00418.06
8.0.260.0000.00618.51
8.0.250.0070.00017.07
8.0.240.0040.00417.02
8.0.230.0040.00417.12
8.0.220.0070.00017.05
8.0.210.0040.00417.00
8.0.200.0080.00017.12
8.0.190.0040.00417.11
8.0.180.0070.00017.09
8.0.170.0030.00617.09
8.0.160.0040.00417.03
8.0.150.0000.00716.85
8.0.140.0030.00517.04
8.0.130.0050.00013.47
8.0.120.0060.00317.05
8.0.110.0070.00017.10
8.0.100.0000.00816.91
8.0.90.0000.00716.94
8.0.80.0070.01017.02
8.0.70.0040.00417.01
8.0.60.0040.00417.02
8.0.50.0060.00316.91
8.0.30.0090.00917.18
8.0.20.0200.00617.09
8.0.10.0080.01417.26
8.0.00.0070.01717.30
7.4.330.0000.00515.55
7.4.320.0000.00716.82
7.4.300.0030.00316.71
7.4.290.0040.00416.75
7.4.280.0030.00816.75
7.4.270.0060.00616.70
7.4.260.0060.00013.48
7.4.250.0000.00816.79
7.4.240.0070.00016.84
7.4.230.0040.00416.91
7.4.220.0030.00416.79
7.4.210.0110.00716.78
7.4.200.0000.00816.81
7.4.140.0140.00816.28
7.4.130.0120.00916.89
7.4.120.0120.00616.61
7.4.110.0100.01016.71
7.4.100.0030.01416.73
7.4.90.0030.01416.63
7.4.80.0120.00616.54
7.4.70.0060.01316.59
7.4.60.0090.00916.54
7.4.50.0030.01416.48
7.4.40.0090.00916.50
7.4.30.0060.01216.57
7.4.20.0090.01216.65
7.4.10.0130.00316.30
7.4.00.0060.01216.80
7.3.330.0070.00016.00
7.3.320.0000.00513.22
7.3.310.0000.00716.12
7.3.300.0030.00316.14
7.3.290.0060.00816.21
7.3.260.0030.01516.15
7.3.250.0200.00016.06
7.3.240.0060.01216.16
7.3.230.0090.00916.17
7.3.220.0070.01016.18
7.3.210.0060.00916.13
7.3.200.0070.01016.16
7.3.190.0100.00616.07
7.3.180.0100.00716.15
7.3.170.0070.01016.20
7.3.160.0090.00916.21
7.3.150.0130.01316.25
7.3.140.0100.00716.15
7.3.130.0120.00616.14
7.3.120.0000.01616.08
7.3.110.0120.00416.19
7.3.100.0100.00616.34
7.3.90.0130.00316.18
7.3.80.0100.00616.41
7.3.70.0060.01216.24
7.3.60.0070.01116.22
7.3.50.0140.00716.24
7.3.40.0150.00316.04
7.3.30.0120.00616.19
7.3.20.0100.00716.08
7.3.10.0120.00616.11
7.3.00.0090.00916.27

preferences:
62.99 ms | 400 KiB | 5 Q