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(function ($a,$b) { return $a==$b; }, [1,5,5,6,6,4,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.0070.01418.50
8.3.50.0090.01021.15
8.3.40.0110.00718.87
8.3.30.0180.00319.05
8.3.20.0040.00420.21
8.3.10.0060.00323.52
8.3.00.0040.01419.38
8.2.180.0130.00316.63
8.2.170.0150.00022.96
8.2.160.0060.01320.42
8.2.150.0070.01024.18
8.2.140.0090.00624.66
8.2.130.0090.00026.16
8.2.120.0090.00022.03
8.2.110.0050.00522.15
8.2.100.0080.00417.50
8.2.90.0070.00019.17
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0100.00017.91
8.2.50.0030.00618.07
8.2.40.0060.00319.95
8.2.30.0000.00718.18
8.2.20.0080.00017.75
8.2.10.0000.00718.00
8.2.00.0030.00517.80
8.1.280.0110.00325.92
8.1.270.0030.00623.77
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00723.98
8.1.230.0040.00819.14
8.1.220.0090.00017.79
8.1.210.0080.00018.77
8.1.200.0040.00417.22
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0030.00718.50
8.1.160.0040.00422.01
8.1.150.0040.00418.89
8.1.140.0000.00717.39
8.1.130.0030.00517.75
8.1.120.0030.00317.37
8.1.110.0040.00417.44
8.1.100.0080.00017.39
8.1.90.0050.00317.47
8.1.80.0070.00017.33
8.1.70.0030.00317.46
8.1.60.0030.00617.51
8.1.50.0000.00817.49
8.1.40.0030.00617.54
8.1.30.0000.00817.60
8.1.20.0080.00017.48
8.1.10.0080.00017.50
8.1.00.0080.00017.53
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.40
8.0.270.0030.00317.16
8.0.260.0000.00617.25
8.0.250.0040.00416.84
8.0.240.0040.00416.85
8.0.230.0000.00716.95
8.0.220.0030.00316.77
8.0.210.0050.00316.95
8.0.200.0020.00516.91
8.0.190.0030.00516.94
8.0.180.0000.00716.83
8.0.170.0000.00716.89
8.0.160.0000.00716.83
8.0.150.0040.00416.84
8.0.140.0000.00716.76
8.0.130.0030.00313.41
8.0.120.0040.00416.83
8.0.110.0040.00416.82
8.0.100.0000.00716.89
8.0.90.0000.00716.76
8.0.80.0130.00316.79
8.0.70.0050.00216.92
8.0.60.0040.00416.74
8.0.50.0030.00316.76
8.0.30.0160.00617.07
8.0.20.0100.01417.43
8.0.10.0080.00016.83
8.0.00.0150.00516.68
7.4.330.0060.00015.02
7.4.320.0030.00616.60
7.4.300.0030.00316.59
7.4.290.0030.00316.62
7.4.280.0070.00016.51
7.4.270.0030.00316.61
7.4.260.0030.00316.50
7.4.250.0050.00216.37
7.4.240.0020.00516.52
7.4.230.0080.00016.25
7.4.220.0030.01416.46
7.4.210.0070.00816.49
7.4.200.0040.00316.53
7.4.160.0090.00616.35
7.4.150.0070.01117.40
7.4.140.0110.00717.86
7.4.130.0080.00916.48
7.4.120.0130.00816.44
7.4.110.0100.01316.31
7.4.100.0130.00316.44
7.4.90.0070.01016.51
7.4.80.0100.00719.39
7.4.70.0090.00916.49
7.4.60.0100.00616.43
7.4.50.0040.00416.50
7.4.40.0040.01216.55
7.4.30.0110.00716.65
7.4.00.0040.01215.04
7.3.330.0000.00513.23
7.3.320.0030.00313.20
7.3.310.0000.00616.34
7.3.300.0000.00716.35
7.3.290.0080.00716.40
7.3.280.0080.01116.40
7.3.270.0030.01517.40
7.3.260.0090.01216.59
7.3.250.0090.00716.48
7.3.240.0070.01016.44
7.3.230.0130.00316.50
7.3.210.0130.00316.49
7.3.200.0060.01019.39
7.3.190.0100.00716.25
7.3.180.0100.00716.65
7.3.170.0150.00616.37
7.3.160.0130.00716.69
7.2.330.0070.01016.82
7.2.320.0070.01316.56
7.2.310.0130.00316.76
7.2.300.0130.00316.60
7.2.290.0070.01416.86
7.2.00.0060.01019.22
7.1.100.0070.00718.08
7.1.70.0030.00517.19
7.1.60.0100.01319.11
7.1.50.0160.00617.02
7.1.00.0030.07722.36
7.0.200.0000.00716.82
7.0.140.0100.06722.13
7.0.60.0000.06020.02
7.0.50.0170.05317.88
7.0.40.0070.09020.28
7.0.30.0230.08320.16
7.0.20.0170.07320.15
7.0.10.0100.05320.16
7.0.00.0100.07320.09
5.6.280.0070.07020.99
5.6.210.0070.06320.57
5.6.200.0200.07018.13
5.6.190.0100.07720.51
5.6.180.0200.06720.55
5.6.170.0230.06320.54
5.6.160.0070.07320.39
5.6.150.0000.09018.30
5.6.140.0070.05318.21
5.6.130.0030.04018.17
5.6.120.0130.07720.90
5.6.110.0030.04320.90
5.6.100.0100.07721.06
5.6.90.0070.06321.02
5.6.80.0030.04020.38
5.6.70.3670.03720.38
5.5.350.0070.08020.33
5.5.340.0070.04018.03
5.5.330.0130.03720.27
5.5.320.0230.04720.37
5.5.310.0300.08020.32
5.5.300.0070.07718.05
5.5.290.0070.07317.95
5.5.280.0070.04320.89
5.5.270.0130.07320.96
5.5.260.0130.08020.98
5.5.250.0070.05020.50
5.5.240.0270.06320.38
5.4.450.0770.05319.64
5.4.440.0600.06319.31
5.4.430.0670.06319.33
5.4.420.0830.04719.59
5.4.410.0570.06019.34
5.4.400.0670.06319.28
5.4.390.0970.05719.12
5.4.380.0630.06019.35
5.4.370.0800.04719.24
5.4.360.0730.06719.10
5.4.350.0770.04719.01
5.4.340.0100.04212.03
5.4.320.0100.03812.51
5.4.310.0080.05012.51
5.4.300.0090.03912.52
5.4.290.0110.04612.51
5.4.280.0090.04112.41
5.4.270.0070.04112.41
5.4.260.0060.04012.41
5.4.250.0080.03612.41
5.4.240.0080.03512.41
5.4.230.0100.04212.40
5.4.220.0070.03612.40
5.4.210.0050.03612.40
5.4.200.0050.03812.39
5.4.190.0060.03612.39
5.4.180.0050.03812.40
5.4.170.0080.03512.40
5.4.160.0050.03912.40
5.4.150.0050.03812.39
5.4.140.0030.03912.08
5.4.130.0070.03312.07
5.4.120.0030.03812.02
5.4.110.0060.03512.02
5.4.100.0070.04812.02
5.4.90.0080.04112.02
5.4.80.0050.03712.02
5.4.70.0050.04012.02
5.4.60.0060.03512.02
5.4.50.0080.03312.00
5.4.40.0100.03212.01
5.4.30.0070.03312.00
5.4.20.0060.03412.00
5.4.10.0110.03612.00
5.4.00.0050.03711.49
5.3.290.0060.03912.80
5.3.280.0080.03612.71
5.3.270.0040.04012.72
5.3.260.0090.03712.72
5.3.250.0080.03612.72
5.3.240.0080.03512.72
5.3.230.0060.03812.71
5.3.220.0090.03812.68
5.3.210.0060.04312.68
5.3.200.0100.03712.68
5.3.190.0040.03912.68
5.3.180.0040.03812.68
5.3.170.0040.03812.67
5.3.160.0060.03712.67
5.3.150.0050.04412.68
5.3.140.0090.03412.66
5.3.130.0070.03812.66
5.3.120.0090.03612.65
5.3.110.0070.03812.65
5.3.100.0070.04112.13
5.3.90.0050.03712.11
5.3.80.0060.03712.09
5.3.70.0060.03712.09
5.3.60.0040.03912.08
5.3.50.0080.03712.02
5.3.40.0050.03912.02
5.3.30.0030.04411.98
5.3.20.0080.04011.77
5.3.10.0050.04011.73
5.3.00.0060.03511.71
5.2.170.0080.0279.22
5.2.160.0050.0299.21
5.2.150.0070.0289.22
5.2.140.0030.0339.21
5.2.130.0060.0289.17
5.2.120.0060.0289.18
5.2.110.0060.0289.19
5.2.100.0080.0289.18
5.2.90.0050.0299.18
5.2.80.0030.0319.17
5.2.70.0050.0309.18
5.2.60.0070.0279.13
5.2.50.0050.0309.09
5.2.40.0030.0319.07
5.2.30.0050.0319.05
5.2.20.0050.0319.04
5.2.10.0090.0248.95
5.2.00.0060.0288.80
5.1.60.0040.0248.08
5.1.50.0040.0268.09
5.1.40.0020.0288.06
5.1.30.0030.0268.42
5.1.20.0040.0278.44
5.1.10.0010.0318.16
5.1.00.0030.0288.16
5.0.50.0030.0216.64
5.0.40.0050.0186.50
5.0.30.0040.0386.31
5.0.20.0020.0216.28
5.0.10.0020.0216.25
5.0.00.0060.0386.25
4.4.90.0040.0154.78
4.4.80.0030.0154.75
4.4.70.0050.0154.76
4.4.60.0030.0214.75
4.4.50.0060.0214.77
4.4.40.0060.0304.71
4.4.30.0050.0214.76
4.4.20.0070.0284.85
4.4.10.0030.0224.85
4.4.00.0040.0254.76
4.3.110.0040.0154.67
4.3.100.0040.0224.66
4.3.90.0060.0184.63
4.3.80.0060.0354.58
4.3.70.0060.0154.63
4.3.60.0010.0224.63
4.3.50.0030.0214.63
4.3.40.0030.0324.54
4.3.30.0030.0193.30
4.3.20.0010.0193.28
4.3.10.0030.0163.24
4.3.00.0130.0177.07

preferences:
42.97 ms | 401 KiB | 5 Q