3v4l.org

run code in 300+ PHP versions simultaneously
<?php function group($cond, $arr) { if (!$arr) return []; $e = array_shift($arr); $g = [$e]; while($cond($e, reset($arr))) { $g[] = array_shift($arr); } return array_merge([$g], group($cond, $arr)); } function it($m,$p){echo ($p?'OK':'NO')." It $m\n";}; echo it ('groups', group($a, [1,5,5,6,6,6,7,9]) == [[1],[5,5],[6,6,6],[7],[9]]);

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.00318.41
8.3.50.0040.01816.38
8.3.40.0090.00618.97
8.3.30.0100.00319.04
8.3.20.0040.00420.34
8.3.10.0040.00423.59
8.3.00.0050.00319.38
8.2.180.0090.00918.41
8.2.170.0110.00322.96
8.2.160.0070.00720.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00422.24
8.2.110.0080.00020.53
8.2.100.0060.00618.03
8.2.90.0050.00319.21
8.2.80.0000.00917.97
8.2.70.0090.00017.50
8.2.60.0000.00817.80
8.2.50.0030.00618.07
8.2.40.0000.00919.88
8.2.30.0020.00517.98
8.2.20.0000.00717.81
8.2.10.0040.00418.05
8.2.00.0080.00017.75
8.1.280.0130.00325.92
8.1.270.0080.00021.82
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0040.00719.08
8.1.220.0040.00417.78
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0060.00618.37
8.1.160.0040.00421.95
8.1.150.0040.00418.89
8.1.140.0040.00417.50
8.1.130.0030.00317.83
8.1.120.0070.00017.43
8.1.110.0040.00417.36
8.1.100.0000.00717.36
8.1.90.0080.00017.35
8.1.80.0000.00717.33
8.1.70.0000.00817.39
8.1.60.0030.00617.61
8.1.50.0000.00917.54
8.1.40.0040.00417.57
8.1.30.0050.00317.58
8.1.20.0000.00817.73
8.1.10.0050.00217.47
8.1.00.0000.00817.49
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.49
8.0.270.0000.00717.26
8.0.260.0070.00017.11
8.0.250.0030.00417.08
8.0.240.0000.00716.93
8.0.230.0000.00716.96
8.0.220.0000.00617.00
8.0.210.0000.00716.89
8.0.200.0040.00416.99
8.0.190.0040.00417.01
8.0.180.0030.00516.95
8.0.170.0050.00217.00
8.0.160.0000.00716.89
8.0.150.0000.00716.96
8.0.140.0000.00816.93
8.0.130.0030.00313.34
8.0.120.0030.00516.90
8.0.110.0000.00716.98
8.0.100.0000.00716.98
8.0.90.0000.00716.92
8.0.80.0100.00716.95
8.0.70.0030.00517.07
8.0.60.0040.00416.78
8.0.50.0050.00216.99
8.0.30.0080.01117.20
8.0.20.0100.01317.40
8.0.10.0040.00417.11
8.0.00.0080.00916.84
7.4.330.0060.00015.02
7.4.320.0070.00316.41
7.4.300.0030.00316.58
7.4.290.0030.00316.59
7.4.280.0040.00416.47
7.4.270.0080.00016.48
7.4.260.0030.00316.42
7.4.250.0050.00216.58
7.4.240.0050.00216.57
7.4.230.0040.00416.61
7.4.220.0030.01416.56
7.4.210.0060.00916.68
7.4.200.0030.00316.67
7.4.160.0100.00516.47
7.4.150.0170.00017.40
7.4.140.0100.01017.86
7.4.130.0120.00516.49
7.4.120.0100.01016.59
7.4.110.0140.00716.48
7.4.100.0150.00316.50
7.4.90.0070.01116.30
7.4.80.0030.01419.39
7.4.70.0100.00716.39
7.4.60.0060.01016.61
7.4.50.0040.00416.68
7.4.40.0070.01416.61
7.4.30.0030.01316.30
7.4.00.0040.01114.90
7.3.330.0000.00513.40
7.3.320.0070.00013.41
7.3.310.0000.00716.27
7.3.300.0070.00016.31
7.3.290.0090.00716.45
7.3.280.0100.00916.43
7.3.270.0110.00717.40
7.3.260.0060.01616.31
7.3.250.0110.00816.60
7.3.240.0100.00716.33
7.3.230.0070.01016.39
7.3.210.0080.00816.72
7.3.200.0130.00719.39
7.3.190.0090.01316.37
7.3.180.0130.00316.54
7.3.170.0070.01016.58
7.3.160.0090.01216.53
7.2.330.0140.00416.66
7.2.320.0100.01716.54
7.2.310.0240.00016.70
7.2.300.0060.01016.70
7.2.290.0070.01416.77
7.2.60.0100.00316.96
7.2.00.0090.00319.39
7.1.200.0030.00915.76
7.1.70.0000.00817.28
7.1.60.0090.01619.11
7.1.50.0160.00334.49
7.1.00.0070.07322.50
7.0.200.0030.01316.69
7.0.140.0030.07022.21
7.0.100.0030.08320.02
7.0.90.0100.08319.88
7.0.80.0100.08020.04
7.0.70.0070.08319.97
7.0.60.0070.08320.11
7.0.50.0230.04320.42
7.0.40.0130.08320.09
7.0.30.0130.07020.13
7.0.20.0000.08020.14
7.0.10.0100.06720.13
7.0.00.0170.07020.03
5.6.280.0030.07320.93
5.6.250.0100.04720.73
5.6.240.0070.08320.65
5.6.230.0030.09020.61
5.6.220.0030.08720.67
5.6.210.0070.07720.63
5.6.200.0130.07320.98
5.6.190.0030.06021.10
5.6.180.0170.07721.07
5.6.170.0100.06320.95
5.6.160.0100.07721.04
5.6.150.0100.08021.06
5.6.140.0100.08021.09
5.6.130.0130.04720.94
5.6.120.0070.08321.08
5.6.110.0100.08020.95
5.6.100.0100.07320.95
5.6.90.0000.09321.07
5.6.80.0000.08020.41
5.6.70.0070.08020.34
5.6.60.0070.06320.39
5.6.50.0100.07320.50
5.6.40.0100.07720.43
5.6.30.0070.07720.34
5.6.20.0100.06720.47
5.6.10.0070.05020.37
5.6.00.0030.05020.30
5.5.380.0100.07720.41
5.5.370.0030.08020.53
5.5.360.0170.07720.49
5.5.350.0030.05720.40
5.5.340.0030.08720.89
5.5.330.0070.08720.85
5.5.320.0030.08720.77
5.5.310.0100.08320.89
5.5.300.0170.07020.89
5.5.290.0100.08020.93
5.5.280.0170.07320.80
5.5.270.0030.08720.89
5.5.260.0030.08720.73
5.5.250.0030.08320.62
5.5.240.0100.08020.20
5.5.230.0100.08020.21
5.5.220.0100.07720.27
5.5.210.0030.07020.22
5.5.200.0030.08020.14
5.5.190.0070.08320.24
5.5.180.0100.07320.20
5.5.160.0230.06320.18
5.5.150.0030.07720.09
5.5.140.0130.06320.23
5.5.130.0070.08020.23
5.5.120.0070.08020.16
5.5.110.0030.09020.11
5.5.100.0100.04720.11
5.5.90.0030.08020.13
5.5.80.0130.07320.05
5.5.70.0100.08320.01
5.5.60.0030.06320.06
5.5.50.0100.07720.11
5.5.40.0100.07020.16
5.5.30.0030.08320.00
5.5.20.0130.07020.16
5.5.10.0100.07020.03
5.5.00.0100.08020.12
5.4.450.0070.07319.38
5.4.440.0030.08719.51
5.4.430.0030.05719.35
5.4.420.0070.08719.50
5.4.410.0170.06019.24
5.4.400.0070.07018.91
5.4.390.0100.07319.04
5.4.380.0030.05719.03
5.4.370.0030.07718.95
5.4.360.0070.06319.16
5.4.350.0100.07019.05
5.4.340.0030.08019.14
5.4.320.0100.08019.16
5.4.310.0100.06719.03
5.4.300.0070.07019.16
5.4.290.0130.06018.85
5.4.280.0130.07019.16
5.4.270.0030.07719.23
5.4.260.0070.08019.21
5.4.250.0170.06019.04
5.4.240.0030.08318.85
5.4.230.0070.07319.20
5.4.220.0130.07319.10
5.4.210.0170.06319.13
5.4.200.0070.04019.04
5.4.190.0030.08019.20
5.4.180.0030.07319.03
5.4.170.0100.07319.04
5.4.160.0070.07019.21
5.4.150.0130.07019.11
5.4.140.0070.07016.46
5.4.130.0130.07016.48
5.4.120.0070.06316.49
5.4.110.0030.08016.49
5.4.100.0170.06016.49
5.4.90.0070.06716.33
5.4.80.0030.04316.50
5.4.70.0130.03016.38
5.4.60.0070.03316.46
5.4.50.0070.03316.27
5.4.40.0030.03716.52
5.4.30.0000.05016.25
5.4.20.0000.03316.33
5.4.10.0070.03716.47
5.4.00.0100.03015.75
5.3.290.0000.04714.60
5.3.280.0070.07314.66
5.3.270.0070.07014.55
5.3.260.0000.05714.59
5.3.250.0070.08014.63
5.3.240.0030.07314.71
5.3.230.0030.07714.67
5.3.220.0070.07014.69
5.3.210.0100.07714.60
5.3.200.0100.07314.55
5.3.190.0100.03714.66
5.3.180.0030.03714.69
5.3.170.0000.04314.50
5.3.160.0030.03714.60
5.3.150.0070.03314.72
5.3.140.0030.03714.59
5.3.130.0000.04314.66
5.3.120.0030.04014.57
5.3.110.0030.03714.53
5.3.100.0070.07314.11
5.3.90.0070.03314.08
5.3.80.0070.03713.94
5.3.70.0000.04014.02
5.3.60.0000.04714.04
5.3.50.0030.04314.00
5.3.40.0070.06013.95
5.3.30.0030.07713.89
5.3.20.0070.05313.62
5.3.10.0070.06313.64
5.3.00.0070.04713.75
5.2.170.0030.03311.28
5.2.160.0000.03011.14
5.2.150.0030.03011.21
5.2.140.0070.03011.09
5.2.130.0070.05711.13
5.2.120.0000.02711.05
5.2.110.0170.02311.23
5.2.100.0070.02311.19
5.2.90.0030.05711.16
5.2.80.0000.04311.01
5.2.70.0030.02711.16
5.2.60.0030.02711.10
5.2.50.0000.03710.93
5.2.40.0030.02711.04
5.2.30.0000.03711.11
5.2.20.0000.03711.11
5.2.10.0070.02310.89
5.2.00.0000.03010.63
5.1.60.0000.02710.05
5.1.50.0030.02310.09
5.1.40.0030.03310.03
5.1.30.0070.03010.41
5.1.20.0000.02710.40
5.1.10.0030.02310.09
5.1.00.0000.03710.14
5.0.50.0000.0208.64
5.0.40.0030.0308.50
5.0.30.0070.0238.29
5.0.20.0030.0178.32
5.0.10.0030.0178.27
5.0.00.0000.0308.25
4.4.90.0000.0137.93
4.4.80.0000.0177.93
4.4.70.0000.0177.93
4.4.60.0000.0177.93
4.4.50.0000.0177.93
4.4.40.0000.0277.93
4.4.30.0030.0307.93
4.4.20.0000.0307.93
4.4.10.0000.0177.93
4.4.00.0000.0237.93
4.3.110.0000.0177.93
4.3.100.0000.0137.93
4.3.90.0000.0137.93
4.3.80.0000.0277.93
4.3.70.0030.0137.93
4.3.60.0030.0137.93
4.3.50.0100.0077.93
4.3.40.0030.0237.93
4.3.30.0000.0337.93
4.3.20.0030.0137.93
4.3.10.0000.0177.93
4.3.00.0000.0137.93

preferences:
45.15 ms | 400 KiB | 5 Q