3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://www.somehost.com/test/index.html?param1=4&param2=3&param3=2&param4=1&param5=3'; function process_url($url) { $parts = parse_url($url); parse_str($parts['query'], $query); $query = array_diff($query, array('3')); asort($query); $query['url'] = $parts['path']; $parts['query'] = http_build_query($query); $new_url = http_build_url($parts); //$new_url = $parts['scheme'] . '://' . $parts['host'] . '/?' . $parts['query']; return $new_url; } var_dump(process_url($url));

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.40.0110.00419.14
8.3.30.0120.00318.91
8.3.20.0050.00320.22
8.3.10.0050.00321.79
8.3.00.0050.00222.43
8.2.170.0070.00722.96
8.2.160.0030.01020.57
8.2.150.0050.00324.18
8.2.140.0070.01424.66
8.2.130.0100.00326.16
8.2.120.0030.00619.78
8.2.110.0100.00022.30
8.2.100.0070.00419.39
8.2.90.0040.00419.14
8.2.80.0070.00318.05
8.2.70.0030.00617.48
8.2.60.0080.00017.78
8.2.50.0060.00318.07
8.2.40.0080.00018.09
8.2.30.0040.00417.98
8.2.20.0070.00017.71
8.2.10.0070.00017.80
8.2.00.0070.00017.59
8.1.270.0060.00320.36
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0050.00323.92
8.1.230.0040.00719.10
8.1.220.0030.00517.74
8.1.210.0000.00918.77
8.1.200.0090.00017.35
8.1.190.0030.00517.39
8.1.180.0030.00618.75
8.1.170.0020.00518.47
8.1.160.0040.00422.19
8.1.150.0040.00418.48
8.1.140.0000.00817.38
8.1.130.0030.00317.82
8.1.120.0040.00417.40
8.1.110.0080.00017.41
8.1.100.0000.00717.40
8.1.90.0000.00717.43
8.1.80.0000.00817.36
8.1.70.0000.00717.36
8.1.60.0030.00517.61
8.1.50.0000.00817.53
8.1.40.0040.00417.52
8.1.30.0030.00517.68
8.1.20.0000.00817.61
8.1.10.0050.00317.56
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0000.00817.05
8.0.280.0000.00718.39
8.0.270.0000.00717.25
8.0.260.0030.00316.87
8.0.250.0000.00716.93
8.0.240.0090.00016.84
8.0.230.0030.00316.85
8.0.220.0030.00316.78
8.0.210.0080.00016.93
8.0.200.0080.00016.92
8.0.190.0030.00316.99
8.0.180.0030.00516.91
8.0.170.0070.00016.75
8.0.160.0040.00416.82
8.0.150.0000.00716.88
8.0.140.0000.00716.76
8.0.130.0030.00313.26
8.0.120.0030.00616.82
8.0.110.0000.00716.84
8.0.100.0040.00416.88
8.0.90.0000.00716.84
8.0.80.0030.01616.87
8.0.70.0030.00616.95
8.0.60.0000.00716.82
8.0.50.0040.00316.87
8.0.30.0120.00617.26
8.0.20.0160.00117.40
8.0.10.0050.00317.01
8.0.00.0090.00816.72
7.4.330.0000.00515.00
7.4.320.0030.00316.41
7.4.300.0030.00316.51
7.4.290.0040.00316.60
7.4.280.0000.00716.52
7.4.270.0000.00716.52
7.4.260.0070.00016.38
7.4.250.0040.00416.51
7.4.240.0000.00716.47
7.4.230.0070.00016.38
7.4.220.0130.00616.61
7.4.210.0080.01116.60
7.4.200.0000.00716.63
7.4.190.0000.00716.76
7.4.160.0070.00716.31
7.4.150.0100.00917.40
7.4.140.0130.01017.86
7.4.130.0080.01016.46
7.4.120.0100.00716.61
7.4.110.0120.00616.29
7.4.100.0110.00716.40
7.4.90.0110.00616.54
7.4.80.0030.01319.39
7.4.70.0030.01516.54
7.4.60.0130.01016.50
7.4.50.0000.00716.40
7.4.40.0130.00322.77
7.4.30.0060.01216.70
7.4.00.0060.00614.60
7.3.330.0000.00513.32
7.3.320.0030.00313.15
7.3.310.0040.00416.38
7.3.300.0000.00716.32
7.3.290.0100.01016.36
7.3.280.0080.00716.34
7.3.270.0090.00617.40
7.3.260.0180.00616.59
7.3.250.0130.00916.25
7.3.240.0070.01116.57
7.3.230.0110.01116.58
7.3.210.0100.00716.61
7.3.200.0060.00919.39
7.3.190.0060.01516.36
7.3.180.0100.00616.59
7.3.170.0120.00916.63
7.3.160.0060.00916.32
7.3.120.0070.00714.97
7.2.330.0120.01216.78
7.2.320.0000.01916.79
7.2.310.0130.00316.72
7.2.300.0000.01616.57
7.2.290.0130.00316.73
7.2.60.0070.01016.75
7.1.200.0040.00715.87
7.1.70.0030.00717.05
7.1.60.0000.01719.82
7.1.50.0070.01816.93
7.1.00.0070.05022.28
7.0.200.0050.00316.66
7.0.140.0000.07721.98
7.0.60.0070.03719.96
7.0.50.0000.04317.89
7.0.40.0070.06720.13
7.0.30.0400.04020.23
7.0.20.0270.06020.07
7.0.10.0070.08020.26
7.0.00.0100.06720.33
5.6.280.0030.07320.87
5.6.210.0100.07320.61
5.6.200.0030.04318.25
5.6.190.0070.08020.53
5.6.180.4400.04720.79
5.6.170.0270.06320.47
5.6.160.0030.09020.61
5.6.150.0130.06718.27
5.6.140.0130.07718.28
5.6.130.0070.07018.17
5.6.120.0070.08021.01
5.6.110.0030.07021.02
5.6.100.0000.08321.11
5.6.90.0170.06321.01
5.6.80.0030.08720.49
5.6.70.4430.04320.39
5.5.350.0270.08020.39
5.5.340.0030.07017.99
5.5.330.0070.07020.29
5.5.320.0300.07720.38
5.5.310.0330.05720.27
5.5.300.0070.06718.02
5.5.290.0030.04017.98
5.5.280.0230.04320.82
5.5.270.0100.08020.87
5.5.260.0030.09020.79
5.5.250.0000.08720.71
5.5.240.0200.06320.05
5.4.450.0230.05319.47
5.4.440.0970.05319.30
5.4.430.0270.05719.61
5.4.420.0770.05719.19
5.4.410.0770.06319.46
5.4.400.0430.07319.13
5.4.390.1400.06319.00
5.4.380.0300.05018.50
5.4.370.0300.05018.55
5.4.360.0430.05018.58
5.4.350.0060.03812.02
5.4.340.0070.03912.02
5.4.320.0070.04112.50
5.4.310.0050.04412.50
5.4.300.0050.03712.51
5.4.290.0100.03912.50
5.4.280.0090.03912.39
5.4.270.0080.04712.40
5.4.260.0110.03512.40
5.4.250.0070.06318.96
5.4.240.0100.05019.00
5.4.230.0070.05318.95
5.4.220.0200.05318.93
5.4.210.0170.07018.99
5.4.200.0070.05719.03
5.4.190.0130.05018.89
5.4.180.0100.05019.09
5.4.170.0100.07318.79
5.4.160.0100.05018.79
5.4.150.0170.05019.01
5.4.140.0100.07016.39
5.4.130.0100.04316.38
5.4.120.0070.06316.38
5.4.110.0200.05316.35
5.4.100.0130.04316.41
5.4.90.0030.05316.55
5.4.80.0100.04716.63
5.4.70.0100.07016.55
5.4.60.0100.04716.46
5.4.50.0130.05316.45
5.4.40.0170.03716.58
5.4.30.0070.05016.38
5.4.20.0070.05016.49
5.4.10.0070.05316.47
5.4.00.0100.07015.79
5.3.290.0050.04012.80
5.3.280.0200.04014.72
5.3.270.0070.07714.78
5.3.260.0030.06714.59
5.3.250.0100.06014.59
5.3.240.0100.05014.77
5.3.230.0170.04014.68
5.3.220.0130.04314.64
5.3.210.0170.04014.64
5.3.200.0070.05014.46
5.3.190.0070.07014.39
5.3.180.0070.07314.57
5.3.170.0130.04714.56
5.3.160.0070.05014.39
5.3.150.0070.07314.53
5.3.140.0200.06314.73
5.3.130.0030.06014.53
5.3.120.0030.05714.53
5.3.110.0130.06014.68
5.3.100.0030.05714.02
5.3.90.0000.05713.93
5.3.80.0000.05714.09
5.3.70.0070.06014.25
5.3.60.0100.05014.07
5.3.50.0130.04314.02
5.3.40.0100.06313.95
5.3.30.0030.05313.97
5.3.20.0030.05013.71
5.3.10.0100.04713.73
5.3.00.0100.05013.54
5.2.170.0000.05311.37
5.2.160.0230.02310.98
5.2.150.0030.04311.05
5.2.140.0070.05011.13
5.2.130.0070.04011.09
5.2.120.0100.04311.09
5.2.110.0070.04011.18
5.2.100.0130.03711.27
5.2.90.0030.04311.31
5.2.80.0070.04011.17
5.2.70.0070.04011.16
5.2.60.0100.03711.21
5.2.50.0100.05011.03
5.2.40.0030.05010.82
5.2.30.0000.04710.80
5.2.20.0130.04311.17
5.2.10.0030.04010.81
5.2.00.0000.04310.55
5.1.60.0100.02710.07
5.1.50.0000.03710.06
5.1.40.0030.03710.07
5.1.30.0130.03310.41
5.1.20.0030.04010.43
5.1.10.0070.0309.90
5.1.00.0000.05710.15
5.0.50.0000.0308.70
5.0.40.0070.0238.45
5.0.30.0030.0438.21
5.0.20.0030.0338.34
5.0.10.0000.0408.16
5.0.00.0130.0408.36
4.4.90.0000.0236.79
4.4.80.0070.0306.79
4.4.70.0030.0276.79
4.4.60.0000.0236.79
4.4.50.0030.0206.79
4.4.40.0000.0336.79
4.4.30.0070.0176.79
4.4.20.0000.0236.79
4.4.10.0000.0336.79
4.4.00.0000.0336.79
4.3.110.0000.0236.79
4.3.100.0000.0236.79
4.3.90.0000.0236.79
4.3.80.0000.0406.79
4.3.70.0030.0206.79
4.3.60.0070.0206.79
4.3.50.0000.0236.79
4.3.40.0000.0406.79
4.3.30.0000.0236.79
4.3.20.0130.0136.79
4.3.10.0000.0336.79
4.3.00.0100.0177.23

preferences:
46.72 ms | 400 KiB | 5 Q