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,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.0040.01118.56
8.3.50.0090.00921.11
8.3.40.0000.01518.83
8.3.30.0110.00419.22
8.3.20.0070.00020.38
8.3.10.0080.00023.61
8.3.00.0090.00619.51
8.2.180.0060.01216.38
8.2.170.0040.01122.96
8.2.160.0030.01320.52
8.2.150.0060.00824.18
8.2.140.0110.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.13
8.2.110.0040.00421.97
8.2.100.0030.00917.63
8.2.90.0000.00919.21
8.2.80.0030.00517.97
8.2.70.0000.00817.50
8.2.60.0030.00717.93
8.2.50.0060.00318.07
8.2.40.0040.00420.07
8.2.30.0030.00618.13
8.2.20.0070.00017.75
8.2.10.0040.00418.01
8.2.00.0050.00317.62
8.1.280.0100.00325.92
8.1.270.0080.00023.91
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.97
8.1.230.0080.00419.14
8.1.220.0050.00317.79
8.1.210.0050.00318.77
8.1.200.0050.00517.35
8.1.190.0060.00317.22
8.1.180.0040.00418.10
8.1.170.0080.00318.59
8.1.160.0050.00222.01
8.1.150.0040.00418.82
8.1.140.0040.00417.31
8.1.130.0050.00317.78
8.1.120.0000.00717.46
8.1.110.0040.00417.46
8.1.100.0000.00717.49
8.1.90.0040.00417.46
8.1.80.0000.00717.45
8.1.70.0070.00017.38
8.1.60.0040.00417.57
8.1.50.0040.00417.55
8.1.40.0040.00417.57
8.1.30.0030.00517.55
8.1.20.0070.00017.58
8.1.10.0050.00217.57
8.1.00.0030.00517.53
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0070.00018.45
8.0.270.0050.00217.19
8.0.260.0000.00617.23
8.0.250.0000.00716.98
8.0.240.0030.00316.88
8.0.230.0000.00716.91
8.0.220.0030.00316.79
8.0.210.0070.00016.81
8.0.200.0080.00016.95
8.0.190.0000.00716.85
8.0.180.0050.00316.80
8.0.170.0050.00316.91
8.0.160.0030.00316.92
8.0.150.0000.00716.81
8.0.140.0000.00716.88
8.0.130.0000.00513.24
8.0.120.0000.00816.87
8.0.110.0000.00716.84
8.0.100.0000.00816.92
8.0.90.0000.00716.93
8.0.80.0100.01016.78
8.0.70.0000.00716.68
8.0.60.0070.00016.95
8.0.50.0040.00416.77
8.0.30.0130.00917.21
8.0.20.0120.00717.40
8.0.10.0030.00616.95
8.0.00.0090.00816.78
7.4.330.0050.00015.02
7.4.320.0080.00016.51
7.4.300.0000.00616.57
7.4.290.0070.00016.48
7.4.280.0000.00716.60
7.4.270.0030.00316.39
7.4.260.0040.00416.39
7.4.250.0000.00716.45
7.4.240.0050.00216.51
7.4.230.0040.00416.58
7.4.220.0100.01016.63
7.4.210.0130.00716.58
7.4.200.0070.00016.57
7.4.160.0120.00416.53
7.4.150.0170.00017.40
7.4.140.0120.00817.86
7.4.130.0080.01116.57
7.4.120.0110.01116.47
7.4.110.0120.01216.41
7.4.100.0160.00016.34
7.4.90.0030.01416.38
7.4.80.0060.01419.39
7.4.70.0040.01216.52
7.4.60.0140.00416.44
7.4.50.0040.00416.56
7.4.40.0090.00916.59
7.4.30.0110.00516.63
7.4.00.0060.01215.04
7.3.330.0020.00313.36
7.3.320.0070.00013.20
7.3.310.0060.00016.34
7.3.300.0040.00416.22
7.3.290.0110.00416.33
7.3.280.0080.00716.33
7.3.270.0120.00417.40
7.3.260.0060.01616.28
7.3.250.0120.00716.44
7.3.240.0170.00416.34
7.3.230.0120.00616.71
7.3.210.0120.00416.66
7.3.200.0090.01619.39
7.3.190.0080.00816.61
7.3.180.0130.00316.62
7.3.170.0100.01316.61
7.3.160.0070.01016.52
7.3.10.0040.01216.58
7.3.00.0090.00016.48
7.2.330.0140.00416.69
7.2.320.0030.01316.50
7.2.310.0100.00616.60
7.2.300.0120.00916.62
7.2.290.0210.00416.59
7.2.130.0040.00817.06
7.2.120.0060.00316.97
7.2.110.0080.00916.99
7.2.100.0150.00317.11
7.2.90.0120.00317.03
7.2.80.0070.00316.77
7.2.70.0060.00617.06
7.2.60.0060.00616.99
7.2.50.0070.00716.99
7.2.40.0030.01017.00
7.2.30.0000.00917.02
7.2.20.0070.00716.99
7.2.10.0090.00617.00
7.2.00.0070.00718.17
7.1.250.0080.00315.60
7.1.200.0000.01415.62
7.1.100.0040.00817.93
7.1.70.0030.01217.24
7.1.60.0140.01019.11
7.1.50.0100.01616.83
7.1.00.0070.07322.29
7.0.200.0040.00716.85
7.0.140.0030.07321.91
7.0.60.0170.02720.03
7.0.50.0070.04017.93
7.0.40.0130.08020.24
7.0.30.0200.06020.23
7.0.20.0370.06720.30
7.0.10.0130.04320.10
7.0.00.0000.06320.11
5.6.280.0030.07321.06
5.6.210.0130.07720.48
5.6.200.0070.08718.29
5.6.190.0100.06720.41
5.6.180.0200.05320.50
5.6.170.0430.08020.42
5.6.160.0100.07720.54
5.6.150.0070.08018.18
5.6.140.0000.05318.19
5.6.130.0070.06318.27
5.6.120.0070.08021.02
5.6.110.0070.03720.95
5.6.100.0070.08320.94
5.6.90.0070.04321.04
5.6.80.0030.04320.45
5.6.70.4430.04020.36
5.5.350.0130.07020.38
5.5.340.0070.08017.98
5.5.330.0030.04720.57
5.5.320.0230.04720.34
5.5.310.0200.06720.28
5.5.300.0070.08317.95
5.5.290.0030.08317.98
5.5.280.0070.08020.99
5.5.270.0170.07020.69
5.5.260.0130.07720.77
5.5.250.0070.03720.51
5.5.240.0300.05320.08
5.4.450.0630.07019.45
5.4.440.0500.06719.19
5.4.430.0430.06719.30
5.4.420.0630.05019.57
5.4.410.0830.04719.44
5.4.400.0430.06318.98
5.4.390.0730.05719.06
5.4.380.0630.05319.30
5.4.370.0900.04319.29
5.4.360.0730.05318.84
5.4.350.0900.04319.22
5.4.340.0030.03812.02
5.4.320.0090.03412.51
5.4.310.0050.03912.50
5.4.300.0050.03812.51
5.4.290.0080.04912.50
5.4.280.0040.03912.41
5.4.270.0080.03812.40
5.4.260.0060.04012.40
5.4.250.0120.04812.41
5.4.240.0080.05012.40
5.4.230.0080.04412.40
5.4.220.0050.04012.39
5.4.210.0040.03712.39
5.4.200.0100.03512.39
5.4.190.0050.04112.39
5.4.180.0090.03812.39
5.4.170.0070.03612.40
5.4.160.0070.03512.39
5.4.150.0070.03512.39
5.4.140.0080.03412.08
5.4.130.0070.03912.06
5.4.120.0070.03512.02
5.4.110.0070.03412.02
5.4.100.0040.03712.02
5.4.90.0060.03612.02
5.4.80.0080.03812.02
5.4.70.0070.03312.01
5.4.60.0060.03412.01
5.4.50.0050.03612.01
5.4.40.0080.03312.00
5.4.30.0090.03212.00
5.4.20.0090.03312.00
5.4.10.0030.03812.00
5.4.00.0050.03611.49
5.3.290.0070.03912.80
5.3.280.0070.03812.71
5.3.270.0060.03912.72
5.3.260.0110.03312.71
5.3.250.0090.03412.72
5.3.240.0090.03712.71
5.3.230.0070.03712.71
5.3.220.0100.04112.68
5.3.210.0070.03912.68
5.3.200.0080.03912.68
5.3.190.0050.04512.68
5.3.180.0050.03912.67
5.3.170.0060.03712.67
5.3.160.0070.04112.67
5.3.150.0130.03412.67
5.3.140.0070.03712.66
5.3.130.0060.03912.66
5.3.120.0080.03712.66
5.3.110.0070.04412.66
5.3.100.0040.04112.13
5.3.90.0070.04012.11
5.3.80.0080.03612.09
5.3.70.0070.03612.09
5.3.60.0050.03812.08
5.3.50.0050.03812.02
5.3.40.0050.03912.02
5.3.30.0070.03511.98
5.3.20.0090.03411.77
5.3.10.0050.03611.73
5.3.00.0070.03911.71
5.2.170.0060.0319.22
5.2.160.0030.0329.21
5.2.150.0040.0339.22
5.2.140.0100.0309.21
5.2.130.0030.0319.17
5.2.120.0050.0309.18
5.2.110.0080.0339.18
5.2.100.0050.0289.17
5.2.90.0060.0299.18
5.2.80.0070.0299.18
5.2.70.0040.0329.17
5.2.60.0040.0309.12
5.2.50.0100.0249.09
5.2.40.0070.0289.07
5.2.30.0030.0329.05
5.2.20.0030.0409.04
5.2.10.0050.0368.95
5.2.00.0040.0308.81
5.1.60.0070.0228.09
5.1.50.0070.0228.09
5.1.40.0050.0248.06
5.1.30.0040.0278.43
5.1.20.0050.0268.44
5.1.10.0070.0238.16
5.1.00.0050.0248.16
5.0.50.0020.0226.64
5.0.40.0050.0176.50
5.0.30.0050.0306.31
5.0.20.0040.0186.28
5.0.10.0050.0196.26
5.0.00.0070.0286.25
4.4.90.0030.0154.78
4.4.80.0030.0154.75
4.4.70.0030.0154.75
4.4.60.0000.0184.75
4.4.50.0030.0154.77
4.4.40.0050.0254.71
4.4.30.0010.0184.76
4.4.20.0020.0164.85
4.4.10.0030.0164.85
4.4.00.0030.0254.76
4.3.110.0030.0194.67
4.3.100.0030.0174.67
4.3.90.0020.0154.63
4.3.80.0030.0254.58
4.3.70.0030.0174.63
4.3.60.0030.0174.63
4.3.50.0020.0164.63
4.3.40.0030.0244.53
4.3.30.0050.0133.30
4.3.20.0020.0163.28
4.3.10.0030.0153.24
4.3.00.0070.0237.07

preferences:
41.02 ms | 401 KiB | 5 Q