3v4l.org

run code in 500+ PHP versions simultaneously
<?php foreach([ 'scheme://user@host/path', 'scheme://host/path', '/path', 'path', '//host/path', 'x:/path', 'scheme:///path', 'file:///path', 'file:/path', 'file:path', ] as $url) { print "\n: $url\n"; if($url === '--') continue; $path = parse_url($url); if($path === false) { print '"Seriously malformed URL." (q) https://php.net/parse_url' . "\n"; continue; } $ta = []; if(isset($path['scheme'])) $ta = array_merge($ta, [$path['scheme'], ":"]); if(isset($path['host']))// || (isset($path['scheme']) && isset($path['path']))) $ta[] = "//"; if(isset($path['user'])) $ta[] = $path['user']; if(isset($path['pass'])) $ta = array_merge($ta, [":", $path['pass']]); if(isset($path['user'])) $ta[] = "@"; if(isset($path['host'])) $ta[] = $path['host']; if(isset($path['port'])) $ta = array_merge($ta, [":", $path['port']]); if(isset($path['path'])) $ta[] = $path['path']; if(isset($path['query'])) $ta = array_merge($ta, ["?", $path['query']]); if(isset($path['fragment'])) $ta = array_merge($ta, ["#", $path['fragment']]); print implode(" ", $ta) . "\n"; }

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.5.70.0070.01116.89
8.5.60.0080.01116.92
8.5.50.0050.00316.73
8.5.30.0110.00719.64
8.5.20.0120.00520.17
8.5.10.0120.00618.22
8.5.00.0110.01119.81
8.4.220.0120.00919.62
8.4.210.0080.01419.43
8.4.180.0120.00919.63
8.4.170.0110.01222.01
8.4.160.0150.00721.95
8.4.150.0040.00816.77
8.4.140.0110.00917.50
8.4.130.0130.00718.88
8.4.120.0120.00820.55
8.4.110.0110.00718.04
8.4.100.0070.00317.59
8.4.90.0130.00720.64
8.4.80.0140.00620.75
8.4.70.0060.01418.81
8.4.60.0110.01120.46
8.4.50.0070.00718.80
8.4.40.0070.00417.76
8.4.30.0090.00617.76
8.4.20.0120.00917.57
8.4.10.0080.00019.43
8.3.310.0100.01018.58
8.3.300.0090.01118.36
8.3.290.0110.01120.93
8.3.280.0140.01118.48
8.3.270.0140.00716.64
8.3.260.0130.00616.64
8.3.250.0090.00818.43
8.3.240.0130.00716.35
8.3.230.0130.00716.69
8.3.220.0130.00618.80
8.3.210.0110.00818.35
8.3.200.0050.00316.57
8.3.190.0010.00717.13
8.3.180.0080.01018.84
8.3.170.0150.00617.38
8.3.160.0080.00016.70
8.3.150.0160.00317.30
8.3.140.0090.00919.00
8.3.130.0000.00918.57
8.3.120.0060.00318.93
8.3.110.0040.00418.12
8.3.100.0130.00618.05
8.3.90.0060.01218.14
8.3.80.0080.00018.43
8.3.70.0090.00618.56
8.3.60.0040.01116.72
8.3.50.0160.00316.57
8.3.40.0150.00318.79
8.3.30.0070.01418.59
8.3.20.0040.00421.86
8.3.10.0040.00421.76
8.3.00.0040.00419.79
8.2.310.0120.01118.18
8.2.300.0160.00722.28
8.2.290.0100.00916.69
8.2.280.0130.00620.13
8.2.270.0070.01116.47
8.2.260.0040.00418.92
8.2.250.0160.00317.23
8.2.240.0030.00517.18
8.2.230.0110.00320.94
8.2.220.0090.00024.06
8.2.210.0120.00326.77
8.2.200.0060.00318.29
8.2.190.0110.00416.75
8.2.180.0040.01118.67
8.2.170.0150.00022.96
8.2.160.0070.00720.14
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00020.47
8.2.120.0070.00026.35
8.2.110.0000.01020.89
8.2.100.0040.00817.71
8.2.90.0020.00518.22
8.2.80.0040.00417.97
8.2.70.0000.00918.05
8.2.60.0050.00318.03
8.2.50.0050.00318.10
8.2.40.0000.00720.60
8.2.30.0080.00019.24
8.2.20.0040.00418.27
8.2.10.0040.00418.14
8.2.00.0030.00518.07
8.1.340.0120.00819.53
8.1.330.0060.00916.16
8.1.320.0100.00818.05
8.1.310.0040.00716.79
8.1.300.0120.00315.80
8.1.290.0030.00618.88
8.1.280.0070.01025.92
8.1.270.0060.00323.95
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0100.00023.90
8.1.230.0050.00521.04
8.1.220.0040.00417.78
8.1.210.0050.00318.99
8.1.200.0090.00017.23
8.1.190.0030.00617.25
8.1.180.0060.00318.10
8.1.170.0040.00418.74
8.1.160.0000.00818.96
8.1.150.0040.00420.31
8.1.140.0000.00719.52
8.1.130.0000.00718.84
8.1.120.0000.00717.46
8.1.110.0030.00617.48
8.1.100.0040.00417.53
8.1.90.0030.00617.52
8.1.80.0040.00417.52
8.1.70.0000.00817.39
8.1.60.0030.00517.52
8.1.50.0030.00517.44
8.1.40.0000.00817.54
8.1.30.0030.00617.63
8.1.20.0030.00617.70
8.1.10.0060.00317.55
8.1.00.0040.00417.45
8.0.300.0030.00520.04
8.0.290.0000.00816.63
8.0.280.0050.00318.30
8.0.270.0060.00017.18
8.0.260.0000.00818.81
8.0.250.0000.00716.93
8.0.240.0040.00416.96
8.0.230.0030.00316.94
8.0.220.0000.00816.82
8.0.210.0040.00416.80
8.0.200.0040.00416.94
8.0.190.0000.01116.90
8.0.180.0070.00016.87
8.0.170.0040.00416.92
8.0.160.0000.00816.80
8.0.150.0050.00216.70
8.0.140.0000.00716.92
8.0.130.0050.00013.38
8.0.120.0000.00716.87
8.0.110.0030.00516.93
8.0.100.0050.00316.77
8.0.90.0000.00816.78
8.0.80.0070.01016.90
8.0.70.0050.00316.78
8.0.60.0050.00316.80
8.0.50.0000.00716.91
8.0.30.0120.00917.09
8.0.20.0110.00917.40
8.0.10.0070.00016.82
8.0.00.0130.00616.98
7.4.330.0000.00515.55
7.4.320.0000.00716.68
7.4.300.0000.00616.62
7.4.290.0080.00016.48
7.4.280.0030.00616.36
7.4.270.0040.00716.63
7.4.260.0090.00016.48
7.4.250.0040.00416.63
7.4.240.0000.00816.54
7.4.230.0000.00716.50
7.4.220.0090.00916.41
7.4.210.0030.01116.64
7.4.200.0030.00416.34
7.4.160.0050.01116.42
7.4.150.0100.01017.40
7.4.140.0140.01717.86
7.4.130.0110.01116.54
7.4.120.0110.00816.53
7.4.110.0130.00716.62
7.4.100.0100.01016.62
7.4.90.0080.01016.50
7.4.80.0100.00619.39
7.4.70.0090.01316.37
7.4.60.0030.01416.44
7.4.50.0120.00316.56
7.4.40.0110.00516.67
7.4.30.0080.00816.57
7.4.00.0040.01415.16
7.3.330.0040.00413.09
7.3.320.0000.00513.26
7.3.310.0030.00316.27
7.3.300.0000.00616.33
7.3.290.0050.01116.35
7.3.280.0070.01016.33
7.3.270.0090.00817.40
7.3.260.0070.01416.46
7.3.250.0120.01216.46
7.3.240.0080.00816.44
7.3.230.0110.01416.44
7.3.210.0150.00616.60
7.3.200.0170.00016.61
7.3.190.0110.00616.63
7.3.180.0090.00616.64
7.3.170.0200.00416.43
7.3.160.0050.01116.29
7.2.330.0060.01216.71
7.2.320.0080.01016.43
7.2.310.0130.01016.83
7.2.300.0200.00316.62
7.2.290.0070.01016.59
7.2.60.0030.00916.76
7.1.200.0100.00715.39
7.1.70.0030.01017.13
7.1.60.0070.01117.17
7.1.50.0070.00716.79
7.1.40.0120.00316.59
7.1.30.0120.00416.50
7.1.20.0090.00616.67
7.1.10.0070.00716.68
7.1.00.0070.00416.96
7.0.200.0040.00816.76
7.0.190.0040.00716.88
7.0.180.0080.00416.33
7.0.170.0080.00416.35
7.0.160.0150.00716.04
7.0.150.0080.00516.27
7.0.140.0180.00616.30
7.0.130.0060.00616.63
7.0.120.0060.00616.50
7.0.110.0140.00316.26
7.0.100.0070.00716.50
7.0.90.0040.00816.42
7.0.80.0070.01016.45
7.0.70.0090.00316.32
7.0.60.0040.00716.19
7.0.50.0080.00416.41
7.0.40.0000.00815.12
7.0.30.0040.00415.12
7.0.20.0040.00415.12
7.0.10.0020.00515.12
7.0.00.0080.00015.12
5.6.300.0070.05020.88
5.6.290.0000.05420.80
5.6.280.0030.04120.92
5.6.270.0100.03621.11
5.6.260.0100.04020.89
5.6.250.0100.04021.04
5.6.240.0100.03820.96
5.6.230.0070.04320.95
5.6.220.0060.04220.80
5.6.210.0260.03821.05
5.6.200.0030.04421.03
5.6.190.0070.04620.84
5.6.180.0030.04620.84
5.6.170.0070.03820.84
5.6.160.0070.04321.03
5.6.150.0200.04220.84
5.6.140.0130.06220.86
5.6.130.0060.03920.78
5.6.120.0100.03821.04
5.6.110.0030.04621.04
5.6.100.0070.04020.99
5.6.90.0030.04320.81
5.6.80.0100.04920.43
5.6.70.0030.04220.31
5.6.60.0030.04620.14
5.6.50.0030.04420.22
5.6.40.0000.06420.10
5.6.30.0130.04320.30
5.6.20.0100.04220.37
5.6.10.0030.04320.23
5.6.00.0130.04420.20
5.5.380.0030.05017.59
5.5.370.0030.04317.52
5.5.360.0030.04617.51
5.5.350.0070.03717.46
5.5.340.0000.04617.86
5.5.330.0030.04417.97
5.5.320.0030.04317.97
5.5.310.0000.04818.03
5.5.300.0000.05918.05
5.5.290.0000.04418.00
5.5.280.0030.04918.11
5.5.270.0030.05918.01
5.5.260.0070.04417.94
5.5.250.0030.04517.75
5.5.240.0040.03917.22
5.5.230.0350.02917.08
5.5.220.0030.03817.33
5.5.210.0100.03217.35
5.5.200.0070.04017.39
5.5.190.0130.03717.38
5.5.180.0030.03917.46
5.5.160.0000.04117.05
5.5.150.0030.04417.29
5.5.140.0000.04317.32
5.5.130.0030.05817.38
5.5.120.0030.04817.34
5.5.110.0070.04017.28
5.5.100.0100.03217.21
5.5.90.0090.03516.98
5.5.80.0070.03316.95
5.5.70.0070.03417.23
5.5.60.0060.04117.30
5.5.50.0030.03617.26
5.5.40.0000.05217.20
5.5.30.0030.03717.36
5.5.20.0030.03716.94
5.5.10.0000.04517.31
5.5.00.0030.04017.20
5.4.450.0100.04919.19
5.4.440.0130.04919.39
5.4.430.0000.04419.23
5.4.420.0030.04419.32
5.4.410.0000.04519.26
5.4.400.0030.04318.92
5.4.390.0200.05719.01
5.4.380.0000.04518.88
5.4.370.0000.04519.14
5.4.360.0060.04119.06
5.4.350.0030.04018.91
5.4.340.0070.04119.02
5.4.320.0030.04119.14
5.4.310.0000.04118.93
5.4.300.0070.03418.93
5.4.290.0070.03319.02
5.4.280.0030.04318.82
5.4.270.0030.03619.05
5.4.260.0030.04019.17
5.4.250.0090.03119.05
5.4.240.0030.06219.14
5.4.230.0030.04619.13
5.4.220.0090.03518.97
5.4.210.0030.04618.88
5.4.200.0000.04219.05
5.4.190.0030.04118.82
5.4.180.0030.03919.16
5.4.170.0430.02319.18
5.4.160.0200.03418.89
5.4.150.0030.03819.12
5.4.140.0030.03416.34
5.4.130.0000.04116.64
5.4.120.0030.03716.44
5.4.110.0030.03716.58
5.4.100.0070.03316.56
5.4.90.0070.03016.37
5.4.80.0030.03616.55
5.4.70.0030.03416.48
5.4.60.0030.03416.38
5.4.50.0000.03916.34
5.4.40.0000.03616.53
5.4.30.0030.03416.64
5.4.20.0030.03416.34
5.4.10.0130.04016.46
5.4.00.0160.03315.88
5.3.290.0030.03715.12
5.3.280.0000.04215.12
5.3.270.0000.04715.12
5.3.260.0030.03715.12
5.3.250.0230.02315.12
5.3.240.0030.03915.12
5.3.230.0000.04015.12
5.3.220.0000.04115.12
5.3.210.0060.03515.12
5.3.200.0000.04015.12
5.3.190.0070.03615.12
5.3.180.0030.03515.12
5.3.170.0030.03915.12
5.3.160.0000.04115.12
5.3.150.0000.03715.12
5.3.140.0060.03115.12
5.3.130.0030.04015.12
5.3.120.0100.03015.12
5.3.110.0030.03815.12
5.3.100.0000.03715.12
5.3.90.0000.04415.12
5.3.80.0070.03315.12
5.3.70.0030.03315.12
5.3.60.0000.03815.12
5.3.50.0000.04015.12
5.3.40.0000.03915.12
5.3.30.0000.04215.12
5.3.20.0000.04115.12
5.3.10.0100.03415.12
5.3.00.0000.03715.12
5.2.170.0070.02915.12
5.2.160.0030.03415.12
5.2.150.0070.02715.12
5.2.140.0000.03415.12
5.2.130.0030.02815.12
5.2.120.0030.03815.12
5.2.110.0030.02615.12
5.2.100.0000.03015.12
5.2.90.0000.03215.12
5.2.80.0000.03315.12
5.2.70.0030.03015.12
5.2.60.0030.02715.12
5.2.50.0000.03815.12
5.2.40.0000.03115.12
5.2.30.0000.03315.12
5.2.20.0030.02715.12
5.2.10.0040.02515.12
5.2.00.0070.02415.12
5.1.60.0030.02215.12
5.1.50.0000.03015.12
5.1.40.0000.02915.12
5.1.30.0030.02915.12
5.1.20.0030.02615.12
5.1.10.0060.02215.12
5.1.00.0100.02015.12
5.0.50.0000.02515.12
5.0.40.0060.01515.12
5.0.30.0030.03015.12
5.0.20.0040.02115.12
5.0.10.0030.02315.12
5.0.00.0000.03415.12
4.4.90.0000.01615.12
4.4.80.0030.01415.12
4.4.70.0000.01715.12
4.4.60.0000.01615.12
4.4.50.0000.01615.12
4.4.40.0030.02515.12
4.4.30.0040.01415.12
4.4.20.0000.01815.12
4.4.10.0000.01915.12
4.4.00.0000.02715.12
4.3.110.0000.02115.12
4.3.100.0090.00915.12
4.3.90.0130.01315.12
4.3.80.0000.02615.12
4.3.70.0060.00915.12
4.3.60.0000.01615.12
4.3.50.0030.01315.12
4.3.40.0030.02215.12
4.3.30.0000.02115.12
4.3.20.0030.01615.12
4.3.10.0030.01515.12
4.3.00.0000.01715.12

preferences:
52.34 ms | 2394 KiB | 5 Q