3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0 => [ 0 => [1,2,3], // +1 1 => [4,5] // +1 ], 1 => [ 0 => [6,7], // +1 1 => [8,9,10] // +1 ] ]; function monkeys($array, $count) { foreach ($array as $sub) { if (! is_array($sub)) { return ++$count; } else { return monkeys($sub, $count); } } } var_dump(monkeys($array,0));

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.0100.01018.30
8.3.50.0060.01321.93
8.3.40.0150.00018.77
8.3.30.0030.01219.07
8.3.20.0040.00420.31
8.3.10.0080.00020.54
8.3.00.0080.00019.13
8.2.180.0150.00316.63
8.2.170.0040.01522.96
8.2.160.0140.00020.53
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.00821.00
8.2.110.0090.00022.07
8.2.100.0090.00317.78
8.2.90.0030.00617.78
8.2.80.0030.00617.97
8.2.70.0030.00717.50
8.2.60.0070.00317.80
8.2.50.0000.00918.07
8.2.40.0000.00718.34
8.2.30.0020.00519.44
8.2.20.0080.00017.59
8.2.10.0040.00417.98
8.2.00.0000.00717.57
8.1.280.0040.01425.92
8.1.270.0060.00323.95
8.1.260.0030.00326.35
8.1.250.0080.00028.09
8.1.240.0100.00022.51
8.1.230.0040.00720.91
8.1.220.0000.00817.79
8.1.210.0030.00618.88
8.1.200.0040.00517.38
8.1.190.0090.00017.23
8.1.180.0030.00518.10
8.1.170.0000.00818.59
8.1.160.0000.00721.90
8.1.150.0000.00818.86
8.1.140.0040.00417.51
8.1.130.0000.00717.84
8.1.120.0000.00717.32
8.1.110.0040.00417.50
8.1.100.0040.00417.43
8.1.90.0000.00817.43
8.1.80.0000.00717.36
8.1.70.0000.00717.38
8.1.60.0030.00617.50
8.1.50.0030.00617.58
8.1.40.0000.00717.41
8.1.30.0050.00317.56
8.1.20.0050.00217.66
8.1.10.0040.00417.45
8.1.00.0040.00417.25
8.0.300.0040.00420.03
8.0.290.0000.00816.75
8.0.280.0000.00718.45
8.0.270.0050.00217.23
8.0.260.0060.00017.28
8.0.250.0030.00316.85
8.0.240.0030.00316.93
8.0.230.0040.00416.86
8.0.220.0000.00616.92
8.0.210.0000.00716.95
8.0.200.0060.00016.99
8.0.190.0000.00717.01
8.0.180.0030.00316.84
8.0.170.0040.00416.84
8.0.160.0000.00816.90
8.0.150.0000.00816.79
8.0.140.0040.00416.89
8.0.130.0000.00513.38
8.0.120.0050.00316.88
8.0.110.0040.00416.79
8.0.100.0050.00216.93
8.0.90.0040.00416.81
8.0.80.0150.00616.79
8.0.70.0050.00316.76
8.0.60.0070.00016.89
8.0.50.0040.00416.78
8.0.30.0080.01017.13
8.0.20.0180.00817.40
8.0.10.0070.00016.98
8.0.00.0060.01316.85
7.4.330.0000.00515.00
7.4.320.0040.00416.51
7.4.300.0000.00716.50
7.4.290.0040.00416.52
7.4.280.0040.00416.60
7.4.270.0000.00716.51
7.4.260.0000.00716.61
7.4.250.0000.00716.48
7.4.240.0050.00216.52
7.4.230.0040.00416.32
7.4.220.0120.00616.60
7.4.210.0100.01016.72
7.4.200.0050.00216.64
7.4.160.0060.01016.53
7.4.150.0190.00017.40
7.4.140.0100.01217.86
7.4.130.0050.01116.43
7.4.120.0100.00716.52
7.4.110.0070.01016.55
7.4.100.0130.00316.66
7.4.90.0180.00016.47
7.4.80.0090.00919.39
7.4.70.0070.01016.62
7.4.60.0140.00316.53
7.4.50.0080.00016.31
7.4.40.0130.00316.66
7.4.30.0090.00616.61
7.4.00.0100.00615.14
7.3.330.0000.00613.33
7.3.320.0030.00313.30
7.3.310.0030.00616.41
7.3.300.0070.00016.27
7.3.290.0090.00616.28
7.3.280.0080.00716.28
7.3.270.0110.00717.40
7.3.260.0050.01316.70
7.3.250.0060.01116.46
7.3.240.0120.00916.60
7.3.230.0050.01116.39
7.3.210.0080.00916.29
7.3.200.0040.01219.39
7.3.190.0120.00416.67
7.3.180.0100.00616.33
7.3.170.0120.00916.39
7.3.160.0130.01016.45
7.3.120.0070.01015.03
7.3.110.0070.00714.71
7.3.100.0110.00414.60
7.3.90.0120.00314.96
7.3.80.0070.00714.57
7.3.70.0030.00614.94
7.3.60.0100.00714.69
7.3.50.0070.00314.77
7.3.40.0030.00714.71
7.3.30.0100.00714.70
7.3.20.0070.00716.52
7.3.10.0030.01016.71
7.3.00.0080.00316.65
7.2.330.0120.00916.78
7.2.320.0100.01016.73
7.2.310.0100.01316.43
7.2.300.0110.00716.45
7.2.290.0100.00616.75
7.2.240.0080.00814.88
7.2.230.0100.00715.15
7.2.220.0090.00914.85
7.2.210.0000.01215.02
7.2.200.0000.01314.76
7.2.190.0060.00915.00
7.2.180.0060.00614.88
7.2.170.0140.00314.96
7.2.160.0030.00614.76
7.2.150.0070.01116.71
7.2.140.0090.00016.97
7.2.130.0030.01317.06
7.2.120.0060.00616.84
7.2.110.0100.00316.95
7.2.100.0080.00416.75
7.2.90.0000.01416.71
7.2.80.0000.01716.97
7.2.70.0100.00616.90
7.2.60.0070.00816.76
7.2.50.0070.00716.92
7.2.40.0130.00717.01
7.2.30.0080.00816.91
7.2.20.0070.00317.09
7.2.10.0040.01217.06
7.2.00.0020.00818.05
7.1.330.0060.01215.76
7.1.320.0030.00615.89
7.1.310.0090.00615.82
7.1.300.0060.00915.79
7.1.290.0000.01215.81
7.1.280.0110.00615.98
7.1.270.0060.00615.52
7.1.260.0030.00515.89
7.1.250.0000.01515.46
7.1.200.0060.00615.79
7.1.100.0040.00718.30
7.1.70.0000.00817.18
7.1.60.0110.01119.61
7.1.50.0090.00416.71
7.1.00.0070.07322.30
7.0.200.0030.00716.92
7.0.140.0000.07722.15
7.0.60.0030.04319.90
7.0.50.0130.08017.94
7.0.40.0030.08720.20
7.0.30.0270.08020.16
7.0.20.0400.07020.23
7.0.10.0330.08020.16
7.0.00.0030.09020.30
5.6.280.0000.07720.91
5.6.210.0170.05320.50
5.6.200.0130.08018.18
5.6.190.0100.04020.48
5.6.180.0230.04320.77
5.6.170.0330.08020.47
5.6.160.0030.04020.57
5.6.150.0100.07718.16
5.6.140.0100.05018.27
5.6.130.0070.05318.25
5.6.120.0070.04020.98
5.6.110.0070.08320.99
5.6.100.0070.03721.14
5.6.90.0100.08320.98
5.6.80.0030.08720.41
5.6.70.0300.07320.44
5.5.350.0100.06720.48
5.5.340.0000.04018.02
5.5.330.0030.04020.42
5.5.320.0370.07020.28
5.5.310.0270.09020.23
5.5.300.0100.07718.00
5.5.290.0170.07017.98
5.5.280.0070.04020.89
5.5.270.0130.07720.96
5.5.260.0070.07320.80
5.5.250.0130.06020.75
5.5.240.0030.03720.26
5.4.450.0100.04719.32
5.4.440.0430.05719.64
5.4.430.0170.03719.20
5.4.420.0700.04319.57
5.4.410.0800.04019.42
5.4.400.0330.04319.35
5.4.390.1130.05319.15
5.4.380.0500.06018.77
5.4.370.0300.04718.56
5.4.360.0500.05018.78
5.4.350.0330.06018.71
5.4.340.0200.06018.78
5.4.320.0090.04012.51
5.4.310.0020.04212.50
5.4.300.0070.03512.50
5.4.290.0070.04312.50
5.4.280.0060.03712.39
5.4.270.0050.03912.40
5.4.260.0020.04212.40
5.4.250.0070.03612.40
5.4.240.0090.04112.40
5.4.230.0060.04012.39
5.4.220.0050.04812.39
5.4.210.0090.03812.39
5.4.200.0070.04012.39
5.4.190.0090.03312.39
5.4.180.0070.03512.38
5.4.170.0090.03412.40
5.4.160.0120.03212.39
5.4.150.0060.04312.39
5.4.140.0060.04112.07
5.4.130.0060.03512.06
5.4.120.0060.03612.02
5.4.110.0130.02912.01
5.4.100.0070.03612.02
5.4.90.0090.03412.01
5.4.80.0060.03812.01
5.4.70.0030.03912.01
5.4.60.0050.03712.01
5.4.50.0080.03412.01
5.4.40.0070.04312.00
5.4.30.0080.03511.99
5.4.20.0110.03311.99
5.4.10.0050.03911.99
5.4.00.0080.03811.48
5.3.290.0090.03712.80
5.3.280.0120.03412.71
5.3.270.0060.03912.73
5.3.260.0090.04312.72
5.3.250.0080.03512.72
5.3.240.0100.04212.72
5.3.230.0060.03812.71
5.3.220.0060.03812.68
5.3.210.0060.04312.68
5.3.200.0080.03612.68
5.3.190.0040.04612.68
5.3.180.0090.03912.67
5.3.170.0070.04012.67
5.3.160.0080.03612.67
5.3.150.0070.04812.67
5.3.140.0120.04112.66
5.3.130.0100.03812.66
5.3.120.0090.04212.66
5.3.110.0080.04512.66
5.3.100.0060.04412.11
5.3.90.0080.04112.08
5.3.80.0030.04512.07
5.3.70.0090.04012.07
5.3.60.0070.03912.06
5.3.50.0060.03812.00
5.3.40.0080.03912.00
5.3.30.0100.03311.95
5.3.20.0100.04211.75
5.3.10.0060.04411.70
5.3.00.0060.04511.68
5.2.170.0080.0389.18
5.2.160.0120.0609.18
5.2.150.0070.0329.18
5.2.140.0100.0359.18
5.2.130.0060.0289.14
5.2.120.0080.0289.14
5.2.110.0080.0279.15
5.2.100.0070.0289.14
5.2.90.0090.0389.14
5.2.80.0090.0389.14
5.2.70.0110.0389.14
5.2.60.0090.0399.09
5.2.50.0070.0399.06
5.2.40.0090.0369.03
5.2.30.0060.0429.02
5.2.20.0090.0369.01
5.2.10.0060.0408.93
5.2.00.0090.0378.78
5.1.60.0060.0258.07
5.1.50.0030.0288.06
5.1.40.0060.0258.05
5.1.30.0030.0288.39
5.1.20.0040.0368.42
5.1.10.0040.0258.14
5.1.00.0040.0268.14
5.0.50.0050.0186.62
5.0.40.0030.0206.48
5.0.30.0030.0326.29
5.0.20.0040.0206.27
5.0.10.0030.0296.24
5.0.00.0050.0356.23
4.4.90.0040.0174.77
4.4.80.0040.0164.75
4.4.70.0070.0144.76
4.4.60.0050.0164.76
4.4.50.0040.0174.77
4.4.40.0030.0274.71
4.4.30.0030.0194.76
4.4.20.0090.0094.85
4.4.10.0050.0144.85
4.4.00.0030.0254.76
4.3.110.0040.0144.66
4.3.100.0040.0144.66
4.3.90.0010.0164.63
4.3.80.0020.0254.58
4.3.70.0040.0134.63
4.3.60.0020.0164.63
4.3.50.0040.0154.63
4.3.40.0030.0244.54
4.3.30.0010.0173.29
4.3.20.0030.0163.26
4.3.10.0030.0203.22
4.3.00.0000.01313.95

preferences:
51.07 ms | 400 KiB | 5 Q