3v4l.org

run code in 300+ PHP versions simultaneously
<?php function group($cond, $arr) { if (empty($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";} function eq($a,$b) {return $a==$b;} echo it ('groups', group('eq', [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.0150.00618.55
8.3.50.0170.00521.28
8.3.40.0110.01118.63
8.3.30.0100.00319.21
8.3.20.0140.00020.25
8.3.10.0030.00623.59
8.3.00.0060.00319.26
8.2.180.0190.00016.38
8.2.170.0150.00022.96
8.2.160.0070.01020.39
8.2.150.0040.00424.18
8.2.140.0110.00724.66
8.2.130.0080.00826.16
8.2.120.0100.00021.96
8.2.110.0030.00620.32
8.2.100.0090.00317.84
8.2.90.0060.00319.17
8.2.80.0080.00017.97
8.2.70.0070.00317.49
8.2.60.0000.00818.04
8.2.50.0060.00318.07
8.2.40.0040.00419.94
8.2.30.0070.00018.07
8.2.20.0000.00717.75
8.2.10.0030.00618.12
8.2.00.0000.00717.62
8.1.280.0140.00725.92
8.1.270.0060.00922.18
8.1.260.0050.00226.35
8.1.250.0070.01028.09
8.1.240.0030.00621.98
8.1.230.0100.00022.10
8.1.220.0020.00517.77
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00818.37
8.1.160.0040.00421.89
8.1.150.0000.00718.84
8.1.140.0000.00717.52
8.1.130.0080.00017.73
8.1.120.0040.00417.49
8.1.110.0040.00417.41
8.1.100.0040.00417.47
8.1.90.0070.00017.43
8.1.80.0040.00417.48
8.1.70.0030.00317.45
8.1.60.0040.00417.58
8.1.50.0030.00517.52
8.1.40.0050.00317.52
8.1.30.0040.00417.55
8.1.20.0040.00417.47
8.1.10.0030.00617.44
8.1.00.0000.00717.46
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00718.44
8.0.270.0000.00717.13
8.0.260.0060.00017.26
8.0.250.0070.00017.00
8.0.240.0070.00016.82
8.0.230.0040.00416.98
8.0.220.0060.00016.79
8.0.210.0040.00416.93
8.0.200.0030.00316.86
8.0.190.0040.00416.88
8.0.180.0000.00816.81
8.0.170.0000.00816.80
8.0.160.0070.00016.79
8.0.150.0030.00516.87
8.0.140.0050.00316.84
8.0.130.0000.00613.36
8.0.120.0000.00816.84
8.0.110.0030.00516.90
8.0.100.0040.00416.92
8.0.90.0070.00016.91
8.0.80.0100.01316.95
8.0.70.0000.00817.00
8.0.60.0000.00716.96
8.0.50.0000.00716.91
8.0.30.0140.00617.20
8.0.20.0110.01017.40
8.0.10.0000.00716.89
8.0.00.0090.00816.68
7.4.330.0000.00515.09
7.4.320.0040.00416.46
7.4.300.0060.00016.36
7.4.290.0070.00016.51
7.4.280.0030.00316.45
7.4.270.0050.00316.52
7.4.260.0030.00316.38
7.4.250.0040.00416.57
7.4.240.0020.00516.60
7.4.230.0000.00716.41
7.4.220.0180.00016.46
7.4.210.0110.00416.66
7.4.200.0030.00316.51
7.4.160.0100.00716.46
7.4.150.0100.00917.40
7.4.140.0100.01017.86
7.4.130.0080.01116.52
7.4.120.0120.00516.53
7.4.110.0100.00716.63
7.4.100.0110.00616.48
7.4.90.0150.00316.46
7.4.80.0100.00719.39
7.4.70.0100.00816.39
7.4.60.0070.01016.64
7.4.50.0040.00416.34
7.4.40.0140.00316.32
7.4.30.0090.00916.58
7.4.00.0100.00615.05
7.3.330.0000.00613.31
7.3.320.0000.00613.19
7.3.310.0000.00716.32
7.3.300.0000.00716.19
7.3.290.0070.00816.33
7.3.280.0070.00816.37
7.3.270.0100.01017.40
7.3.260.0060.01116.48
7.3.250.0130.00316.39
7.3.240.0100.01016.49
7.3.230.0030.01316.39
7.3.210.0040.01316.62
7.3.200.0120.00919.39
7.3.190.0060.01216.63
7.3.180.0090.01316.38
7.3.170.0150.00716.30
7.3.160.0060.00916.50
7.3.10.0050.01416.46
7.3.00.0080.01416.79
7.2.330.0120.00616.70
7.2.320.0190.00316.62
7.2.310.0090.00616.77
7.2.300.0100.00716.79
7.2.290.0100.01316.82
7.2.130.0070.00916.74
7.2.120.0060.00916.69
7.2.110.0160.00216.65
7.2.100.0060.00816.60
7.2.90.0110.01016.68
7.2.80.0080.01016.78
7.2.70.0090.01016.95
7.2.60.0110.00616.74
7.2.50.0140.00316.67
7.2.40.0120.00516.66
7.2.30.0090.00816.67
7.2.20.0130.00516.61
7.2.10.0050.01016.58
7.2.00.0070.00916.68
7.1.250.0090.00615.67
7.1.200.0100.00315.90
7.1.70.0000.00817.33
7.1.60.0140.01019.11
7.1.50.0070.01716.69
7.1.00.0100.07022.32
7.0.200.0040.00416.93
7.0.140.0000.06721.93
7.0.60.0070.08019.99
7.0.50.0030.04717.93
7.0.40.0100.04720.20
7.0.30.0230.08320.16
7.0.20.0330.07020.19
7.0.10.0070.04020.33
7.0.00.0070.08320.12
5.6.210.0070.03720.55
5.6.200.0000.04718.20
5.6.190.0070.04020.55
5.6.180.0300.07320.46
5.6.170.0270.04020.50
5.6.160.0000.05720.46
5.6.150.0070.07018.27
5.6.140.0030.04018.14
5.6.130.0130.06718.14
5.6.120.0030.04321.04
5.6.110.0100.08021.01
5.6.100.0070.03721.12
5.6.90.0100.05021.02
5.6.80.0030.07320.39
5.6.70.4430.03720.41
5.5.350.0170.07320.46
5.5.340.0230.06317.99
5.5.330.0100.08320.27
5.5.320.0430.06720.25
5.5.310.0200.05720.32
5.5.300.0030.04017.95
5.5.290.0100.08018.04
5.5.280.0070.05020.96
5.5.270.0170.03020.73
5.5.260.0070.06020.98
5.5.250.0030.06720.60
5.5.240.0170.03720.33
5.4.450.0070.06019.56
5.4.440.0870.05719.70
5.4.430.0930.03719.16
5.4.420.0870.06319.63
5.4.410.0200.05319.48
5.4.400.0600.06019.01
5.4.390.0630.05319.28
5.4.380.0100.05319.15
5.4.370.0830.06319.23
5.4.360.0130.05019.13
5.4.350.0830.05019.02
5.4.340.0080.03412.02
5.4.320.0110.04012.51
5.4.310.0080.03512.50
5.4.300.0090.04512.51
5.4.290.0040.04312.51
5.4.280.0050.03712.40
5.4.270.0060.03612.40
5.4.260.0050.04012.40
5.4.250.0090.05012.40
5.4.240.0120.04612.40
5.4.230.0050.04712.40
5.4.220.0090.03512.39
5.4.210.0040.03812.39
5.4.200.0100.03312.39
5.4.190.0070.03612.39
5.4.180.0050.03812.39
5.4.170.0090.03712.40
5.4.160.0060.03512.40
5.4.150.0070.03512.39
5.4.140.0040.03912.07
5.4.130.0070.03512.06
5.4.120.0060.03612.02
5.4.110.0060.04112.02
5.4.100.0070.03512.01
5.4.90.0070.03612.02
5.4.80.0030.04012.02
5.4.70.0060.03412.01
5.4.60.0060.03412.01
5.4.50.0090.03312.01
5.4.40.0060.03712.00
5.4.30.0110.03212.00
5.4.20.0020.04012.00
5.4.10.0090.03311.99
5.4.00.0040.03911.48
5.3.290.0030.04212.80
5.3.280.0120.03512.71
5.3.270.0070.03812.72
5.3.260.0050.04012.72
5.3.250.0070.03712.72
5.3.240.0050.03912.72
5.3.230.0070.03812.71
5.3.220.0120.03212.68
5.3.210.0040.04812.68
5.3.200.0050.03912.68
5.3.190.0080.03712.68
5.3.180.0110.03912.67
5.3.170.0120.04812.66
5.3.160.0060.04012.67
5.3.150.0060.03712.68
5.3.140.0060.03612.66
5.3.130.0070.03712.66
5.3.120.0050.04412.66
5.3.110.0060.04612.65
5.3.100.0050.04112.13
5.3.90.0070.03812.11
5.3.80.0090.03612.09
5.3.70.0070.03612.09
5.3.60.0090.03412.09
5.3.50.0040.03912.02
5.3.40.0050.04012.02
5.3.30.0080.03511.98
5.3.20.0080.03811.77
5.3.10.0030.03811.73
5.3.00.0080.03911.71
5.2.170.0080.0299.21
5.2.160.0080.0349.21
5.2.150.0080.0409.22
5.2.140.0050.0449.21
5.2.130.0160.0469.17
5.2.120.0080.0419.18
5.2.110.0100.0379.18
5.2.100.0050.0329.18
5.2.90.0080.0409.18
5.2.80.0060.0519.17
5.2.70.0100.0409.17
5.2.60.0060.0409.12
5.2.50.0060.0409.09
5.2.40.0060.0389.07
5.2.30.0070.0289.05
5.2.20.0090.0359.04
5.2.10.0130.0298.95
5.2.00.0070.0378.81
5.1.60.0100.0258.09
5.1.50.0050.0338.09
5.1.40.0030.0368.07
5.1.30.0060.0398.43
5.1.20.0050.0348.44
5.1.10.0070.0298.16
5.1.00.0070.0338.16
5.0.50.0070.0246.64
5.0.40.0060.0256.50
5.0.30.0040.0376.31
5.0.20.0050.0216.28
5.0.10.0050.0246.26
5.0.00.0090.0396.25
4.4.90.0040.0224.78
4.4.80.0040.0154.76
4.4.70.0010.0174.76
4.4.60.0040.0144.75
4.4.50.0030.0164.77
4.4.40.0020.0324.71
4.4.30.0010.0174.76
4.4.20.0040.0154.85
4.4.10.0020.0174.85
4.4.00.0020.0274.75
4.3.110.0060.0134.67
4.3.100.0030.0194.66
4.3.90.0040.0204.63
4.3.80.0040.0284.58
4.3.70.0040.0194.63
4.3.60.0030.0184.62
4.3.50.0030.0154.63
4.3.40.0030.0254.54
4.3.30.0020.0163.30
4.3.20.0020.0173.27
4.3.10.0030.0203.24
4.3.00.0030.0276.85

preferences:
46.6 ms | 401 KiB | 5 Q