3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayMax = function ($max, $value) use (&$arrayMax) { if (is_array($value)) return array_reduce($value, $arrayMax, $max); elseif (is_int($value)) return $max === null ? $value : max($max, $value); else return $max; }; var_dump(array_reduce([5, 7, 2, ['25', [20]]], $arrayMax));

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.00718.43
8.3.50.0100.00921.98
8.3.40.0120.00818.71
8.3.30.0030.01019.06
8.3.20.0000.00720.34
8.3.10.0080.00021.90
8.3.00.0050.00220.67
8.2.180.0000.01516.32
8.2.170.0110.00422.96
8.2.160.0100.00322.04
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00222.06
8.2.110.0040.00422.30
8.2.100.0070.00717.97
8.2.90.0040.00419.21
8.2.80.0060.00318.05
8.2.70.0030.00717.50
8.2.60.0060.00318.04
8.2.50.0040.00418.07
8.2.40.0040.00419.32
8.2.30.0050.00218.07
8.2.20.0030.00617.65
8.2.10.0040.00417.62
8.2.00.0000.00817.74
8.1.280.0040.01125.92
8.1.270.0030.00623.73
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00323.71
8.1.230.0060.00619.15
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0030.00617.53
8.1.180.0000.00818.10
8.1.170.0000.00818.56
8.1.160.0000.00722.03
8.1.150.0040.00418.65
8.1.140.0040.00417.46
8.1.130.0030.00317.83
8.1.120.0090.00017.48
8.1.110.0040.00417.46
8.1.100.0040.00417.47
8.1.90.0070.00017.36
8.1.80.0070.00017.51
8.1.70.0070.00017.42
8.1.60.0050.00317.64
8.1.50.0030.00517.41
8.1.40.0040.00417.55
8.1.30.0030.00517.47
8.1.20.0050.00317.67
8.1.10.0060.00317.45
8.1.00.0050.00217.47
8.0.300.0040.00418.77
8.0.290.0000.00717.18
8.0.280.0050.00318.51
8.0.270.0000.00717.31
8.0.260.0000.00716.73
8.0.250.0030.00316.83
8.0.240.0070.00016.99
8.0.230.0000.00716.84
8.0.220.0050.00316.95
8.0.210.0000.00916.84
8.0.200.0000.00616.83
8.0.190.0000.00716.83
8.0.180.0000.00716.89
8.0.170.0080.00016.83
8.0.160.0000.00716.85
8.0.150.0080.00016.83
8.0.140.0030.00616.92
8.0.130.0000.00513.29
8.0.120.0080.00016.89
8.0.110.0040.00416.89
8.0.100.0000.00716.91
8.0.90.0070.00016.86
8.0.80.0060.00916.84
8.0.70.0000.00716.79
8.0.60.0030.00316.71
8.0.50.0080.00016.92
8.0.30.0080.01117.15
8.0.20.0130.00817.44
8.0.10.0070.00017.03
8.0.00.0110.00616.86
7.4.330.0060.00015.08
7.4.320.0000.00616.38
7.4.300.0000.00616.60
7.4.290.0040.00416.51
7.4.280.0030.00316.60
7.4.270.0070.00016.60
7.4.260.0070.00016.41
7.4.250.0080.00016.56
7.4.240.0020.00616.49
7.4.230.0040.00416.42
7.4.220.0130.01616.45
7.4.210.0040.01216.69
7.4.200.0050.00316.51
7.4.190.0000.00716.59
7.4.160.0090.00816.64
7.4.150.0030.01317.40
7.4.140.0090.00817.86
7.4.130.0060.01216.62
7.4.120.0050.01216.48
7.4.110.0090.00616.43
7.4.100.0170.00316.63
7.4.90.0080.00816.41
7.4.80.0030.01216.50
7.4.70.0060.01116.51
7.4.60.0030.01316.47
7.4.50.0060.00316.34
7.4.40.0070.01122.77
7.4.30.0090.00916.52
7.4.00.0110.00715.12
7.3.330.0030.00313.37
7.3.320.0000.00513.31
7.3.310.0080.00016.38
7.3.300.0030.00316.41
7.3.290.0120.00316.36
7.3.280.0090.01016.36
7.3.270.0110.00517.40
7.3.260.0150.00316.35
7.3.250.0130.00816.48
7.3.240.0040.01216.36
7.3.230.0100.00716.55
7.3.210.0130.00316.36
7.3.200.0120.00919.39
7.3.190.0000.01716.30
7.3.180.0060.01016.31
7.3.170.0030.01316.66
7.3.160.0070.01016.59
7.3.120.0030.01014.83
7.2.330.0110.00616.38
7.2.320.0030.01316.44
7.2.310.0120.00416.82
7.2.300.0140.00716.73
7.2.290.0140.00416.68
7.2.60.0030.01016.95
7.2.50.0030.01016.94
7.2.00.0110.00019.47
7.1.200.0060.00615.77
7.1.100.0040.00718.41
7.1.70.0040.00417.22
7.1.60.0030.02019.32
7.1.50.0160.00316.69
7.1.00.0000.07722.54
7.0.200.0040.00416.93
7.0.140.0000.07721.95
7.0.60.0070.07719.91
7.0.50.0030.08317.86
7.0.40.0030.05320.11
7.0.30.0270.08720.12
7.0.20.0170.04720.26
7.0.10.0030.08720.24
7.0.00.0130.05320.16
5.6.280.0130.06321.14
5.6.210.0100.07320.51
5.6.200.0130.07718.19
5.6.190.0100.06720.61
5.6.180.0200.08320.77
5.6.170.0300.05320.52
5.6.160.0170.07720.49
5.6.150.0100.07718.12
5.6.140.0100.03318.15
5.6.130.0100.06718.21
5.6.120.0030.05720.99
5.6.110.0030.08321.00
5.6.100.0070.04020.93
5.6.90.0130.07020.96
5.6.80.0100.06720.36
5.5.350.0170.03320.35
5.5.340.0000.04318.05
5.5.330.0100.07720.29
5.5.320.0230.08020.28
5.5.310.0330.04320.29
5.5.300.0030.03718.08
5.5.290.0070.04017.98
5.5.280.0130.07720.69
5.5.270.0100.04020.77
5.5.260.0100.08320.84
5.5.250.0030.04020.78
5.5.240.0100.07720.37
5.4.450.0370.06719.41
5.4.440.0230.05319.63
5.4.430.0270.04019.51
5.4.420.0430.06019.30
5.4.410.0330.06719.41
5.4.400.0300.07019.23
5.4.390.0270.05318.88
5.4.380.0430.05318.88
5.4.370.0230.06318.87
5.4.360.0330.06019.23
5.4.350.0200.04319.09
5.4.340.0230.04319.00
5.4.320.0130.04318.99
5.4.310.0230.04019.07
5.4.300.0200.03719.24
5.4.290.0170.04018.97
5.4.280.0230.03319.14
5.4.270.0230.03018.98
5.4.260.0200.06018.95
5.4.250.0170.03719.15
5.4.240.0230.03019.21
5.4.230.0230.03019.21
5.4.220.0200.03318.94
5.4.210.0170.04019.14
5.4.200.0300.03319.30
5.4.190.0200.04019.21
5.4.180.0200.04719.18
5.4.170.0170.04019.21
5.4.160.0230.03019.06
5.4.150.0230.04019.22
5.4.140.0230.03016.35
5.4.130.0200.03716.57
5.4.120.0130.04316.34
5.4.110.0270.05316.55
5.4.100.0200.04316.47
5.4.90.0230.03316.57
5.4.80.0270.06316.50
5.4.70.0230.03316.33
5.4.60.0270.02716.24
5.4.50.0370.06316.38
5.4.40.0230.07316.44
5.4.30.0270.05316.32
5.4.20.0370.06016.37
5.4.10.0330.04316.51
5.4.00.0330.06715.99
5.3.290.0170.04014.58
5.3.280.0170.03714.75
5.3.270.0170.03714.69
5.3.260.0230.03014.61
5.3.250.0270.03314.51
5.3.240.0200.03714.58
5.3.230.0230.03314.75
5.3.220.0230.04014.68
5.3.210.0270.04014.64
5.3.200.0230.03714.54
5.3.190.0230.03714.57
5.3.180.0370.05014.53
5.3.170.0230.07014.53
5.3.160.0230.07314.46
5.3.150.0200.04314.55
5.3.140.0400.06314.45
5.3.130.0300.07714.45
5.3.120.0270.05714.55
5.3.110.0200.04714.51
5.3.100.0230.07714.26
5.3.90.0330.06314.09
5.3.80.0200.05713.94
5.3.70.0300.07313.93
5.3.60.0230.07313.94
5.3.50.0300.06314.02
5.3.40.0270.07314.08
5.3.30.0270.07014.13
5.3.20.0300.04313.59
5.3.10.0330.05713.56
5.3.00.0400.05713.61
5.2.170.0230.03713.04
5.2.160.0230.06013.04
5.2.150.0330.02713.04
5.2.140.0330.03713.04
5.2.130.0270.04713.04
5.2.120.0270.03013.04
5.2.110.0200.06013.04
5.2.100.0300.04013.04
5.2.90.0270.03013.04
5.2.80.0270.05713.04
5.2.70.0300.05313.04
5.2.60.0270.05713.04
5.2.50.0270.05713.04
5.2.40.0230.04013.04
5.2.30.0200.03713.04
5.2.20.0170.04013.04
5.2.10.0270.05013.04
5.2.00.0170.04313.04
5.1.60.0230.04313.04
5.1.50.0170.03313.04
5.1.40.0200.05313.04
5.1.30.0230.05013.04
5.1.20.0170.04713.04
5.1.10.0200.05013.04
5.1.00.0230.04313.04
5.0.50.0170.04013.04
5.0.40.0070.03713.04
5.0.30.0100.03713.04
5.0.20.0100.03313.04
5.0.10.0130.02713.04
5.0.00.0100.04313.04
4.4.90.0070.03713.04
4.4.80.0100.02313.04
4.4.70.0070.02013.04
4.4.60.0130.01313.04
4.4.50.0030.02313.04
4.4.40.0170.04713.04
4.4.30.0070.03713.04
4.4.20.0100.03713.04
4.4.10.0130.03013.04
4.4.00.0100.04313.04
4.3.110.0170.02713.04
4.3.100.0130.03313.04
4.3.90.0070.03313.04
4.3.80.0100.04013.04
4.3.70.0130.02713.04
4.3.60.0100.02713.04
4.3.50.0070.02313.04
4.3.40.0100.02713.04
4.3.30.0070.01713.04
4.3.20.0070.03713.04
4.3.10.0000.04013.04
4.3.00.0100.02713.04

preferences:
41.54 ms | 401 KiB | 5 Q