3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['moo' => 'abc', 'foo' => 1], ['moo' => 'gyu', 'foo' => 2] ]; $newArr = array_reduce($arr, function($carry, $item){ if ($item['moo'] == 'gyu') $carry = $item; return $carry; }); print_r($newArr);

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.4.140.0110.01017.59
8.4.130.0050.00518.72
8.4.120.0120.00817.96
8.4.110.0070.00217.56
8.4.100.0140.00717.60
8.4.90.0130.00818.60
8.4.80.0080.00117.93
8.4.70.0070.00917.79
8.4.60.0130.00718.57
8.4.50.0100.00319.37
8.4.40.0120.00617.72
8.4.30.0160.00317.52
8.4.20.0100.00018.80
8.4.10.0070.00317.68
8.3.270.0100.00916.44
8.3.260.0090.01016.57
8.3.250.0130.00516.60
8.3.240.0120.00718.62
8.3.230.0120.00716.63
8.3.220.0100.00917.00
8.3.210.0110.00916.52
8.3.200.0050.00416.54
8.3.190.0050.00317.24
8.3.180.0040.00416.80
8.3.170.0090.01016.57
8.3.160.0140.00317.04
8.3.150.0120.00617.19
8.3.140.0090.00918.89
8.3.130.0090.00918.41
8.3.120.0040.00420.88
8.3.110.0070.00420.94
8.3.100.0100.00716.62
8.3.90.0070.00726.77
8.3.80.0060.00317.97
8.3.70.0070.00716.41
8.3.60.0090.00916.38
8.3.50.0120.00218.15
8.3.40.0120.00318.67
8.3.30.0070.01118.36
8.3.20.0060.00318.64
8.3.10.0090.00721.90
8.3.00.0060.00420.19
8.2.290.0090.01020.34
8.2.280.0140.00519.89
8.2.270.0110.00718.45
8.2.260.0060.00916.97
8.2.250.0030.00718.33
8.2.240.0040.00816.96
8.2.230.0100.00722.58
8.2.220.0060.00324.06
8.2.210.0110.00826.77
8.2.200.0090.00018.88
8.2.190.0090.00616.69
8.2.180.0070.00718.38
8.2.170.0090.00622.96
8.2.160.0070.00722.26
8.2.150.0000.00925.66
8.2.140.0060.00222.57
8.2.130.0060.00221.45
8.2.120.0080.00022.66
8.2.110.0060.00220.04
8.2.100.0050.00518.43
8.2.90.0040.00419.18
8.2.80.0060.00218.54
8.2.70.0050.00318.20
8.2.60.0040.00418.40
8.2.50.0000.00818.40
8.2.40.0060.00718.53
8.2.30.0080.00418.26
8.2.20.0040.00418.20
8.2.10.0060.00418.10
8.2.00.0050.00618.03
8.1.330.0150.00415.95
8.1.320.0090.01016.23
8.1.310.0070.00316.95
8.1.300.0140.00717.93
8.1.290.0030.00630.84
8.1.280.0110.00725.92
8.1.270.0060.00621.22
8.1.260.0080.00024.20
8.1.250.0080.00025.09
8.1.240.0030.00518.84
8.1.230.0040.00520.37
8.1.220.0040.00318.35
8.1.210.0050.00318.65
8.1.200.0030.00518.11
8.1.190.0040.00418.05
8.1.180.0020.00618.33
8.1.170.0050.00918.63
8.1.160.0070.00418.26
8.1.150.0060.00518.30
8.1.140.0040.00718.05
8.1.130.0070.00718.12
8.1.120.0080.00717.74
8.1.110.0070.00617.75
8.1.100.0100.00217.70
8.1.90.0070.00617.76
8.1.80.0060.00617.80
8.1.70.0080.00417.55
8.1.60.0070.00717.80
8.1.50.0090.00517.72
8.1.40.0080.00417.73
8.1.30.0060.00617.86
8.1.20.0080.00517.89
8.1.10.0050.00717.69
8.1.00.0070.00717.64
8.0.300.0080.00218.33
8.0.290.0080.00317.29
8.0.280.0110.00318.15
8.0.270.0090.00417.70
8.0.260.0140.00116.95
8.0.250.0070.00617.04
8.0.240.0070.00617.05
8.0.230.0100.00216.97
8.0.220.0040.00716.97
8.0.210.0080.00316.97
8.0.200.0050.00617.05
8.0.190.0080.00417.11
8.0.180.0070.00417.06
8.0.170.0060.00517.02
8.0.160.0080.00417.05
8.0.150.0110.00217.01
8.0.140.0100.00216.92
8.0.130.0090.00416.27
8.0.120.0100.00216.40
8.0.110.0090.00316.34
8.0.100.0110.00416.33
8.0.90.0100.00216.36
8.0.80.0100.00416.40
8.0.70.0060.00516.39
8.0.60.0080.00516.35
8.0.50.0060.00516.37
8.0.30.0080.00716.66
8.0.20.0110.00316.62
8.0.10.0090.00416.47
8.0.00.0140.00416.80
7.4.330.0090.00615.54
7.4.320.0140.00516.71
7.4.300.0110.00816.63
7.4.290.0140.00516.62
7.4.280.0130.00416.61
7.4.270.0120.00716.62
7.4.260.0140.00416.50
7.4.250.0130.00416.04
7.4.240.0120.00316.12
7.4.230.0100.00516.17
7.4.220.0120.00416.01
7.4.210.0110.00616.14
7.4.200.0100.00516.03
7.4.190.0120.00316.11
7.4.180.0110.00316.03
7.4.160.0110.00616.20
7.4.150.0140.00215.95
7.4.140.0120.00616.89
7.4.130.0090.00916.00
7.4.120.0130.00516.17
7.4.110.0130.00516.01
7.4.100.0140.00416.05
7.4.90.0120.00615.99
7.4.80.0110.00616.49
7.4.70.0130.00515.99
7.4.60.0140.00516.05
7.4.50.0130.00415.87
7.4.40.0110.00415.92
7.4.30.0120.00415.83
7.4.20.0090.00415.76
7.4.10.0100.00315.86
7.4.00.0080.00515.74
7.3.330.0100.00315.83
7.3.320.0110.00115.45
7.3.310.0110.00215.95
7.3.300.0080.00415.91
7.3.290.0100.00215.87
7.3.280.0070.00816.02
7.3.270.0110.00515.78
7.3.260.0090.00716.16
7.3.250.0130.00415.79
7.3.240.0090.00716.14
7.3.230.0140.00315.93
7.3.220.0130.00315.74
7.3.210.0100.00715.88
7.3.200.0140.00415.84
7.3.190.0080.01015.89
7.3.180.0110.00415.92
7.3.170.0100.00515.96
7.3.160.0090.00615.91
7.3.150.0130.00215.85
7.3.140.0130.00515.77
7.3.130.0120.00515.77
7.3.120.0130.00315.79
7.3.110.0110.00215.86
7.3.100.0080.00715.72
7.3.90.0130.00216.05
7.3.80.0120.00215.76
7.3.70.0100.00415.90
7.3.60.0090.00515.92
7.3.50.0100.00415.88
7.3.40.0100.00315.97
7.3.30.0120.00615.91
7.3.20.0110.00417.73
7.3.10.0120.00517.76
7.3.00.0140.00217.66
7.2.340.0100.00415.92
7.2.330.0120.00316.03
7.2.320.0110.00415.99
7.2.310.0090.00716.05
7.2.300.0110.00615.96
7.2.290.0100.00616.05
7.2.280.0100.00415.95
7.2.270.0120.00215.98
7.2.260.0120.00715.95
7.2.250.0110.00615.97
7.2.240.0130.00415.87
7.2.230.0140.00415.97
7.2.220.0110.00715.85
7.2.210.0070.01015.92
7.2.200.0130.00615.93
7.2.190.0110.00715.98
7.2.180.0110.00515.98
7.2.170.0090.00616.10
7.2.160.0100.00416.06
7.2.150.0110.00617.80
7.2.140.0120.00317.87
7.2.130.0110.00417.96
7.2.120.0120.00317.89
7.2.110.0110.00417.95
7.2.100.0260.00417.43
7.2.90.0310.00617.28
7.2.80.0320.00417.37
7.2.70.0380.00417.44
7.2.60.0360.00317.35
7.2.50.0470.00617.32
7.2.40.0310.00417.33
7.2.30.0300.00617.39
7.2.20.0370.00317.40
7.2.10.0260.00517.38
7.2.00.0300.00617.49
7.1.330.0120.00216.87
7.1.320.0130.00316.81
7.1.310.0110.00316.92
7.1.300.0110.00316.87
7.1.290.0110.00416.91
7.1.280.0090.00616.83
7.1.270.0100.00417.09
7.1.260.0090.00516.91
7.1.250.0110.00416.77
7.1.240.0120.00516.78
7.1.230.0130.00416.88
7.1.220.0230.00716.42
7.1.210.0330.00616.31
7.1.200.0360.00416.30
7.1.190.0380.00616.28
7.1.180.0350.00116.37
7.1.170.0290.00316.35
7.1.160.0300.00516.31
7.1.150.0240.00416.36
7.1.140.0280.00416.29
7.1.130.0290.00416.30
7.1.120.0220.00516.08
7.1.110.0330.00616.30
7.1.100.0410.00416.26
7.1.90.0350.00316.32
7.1.80.0290.00616.34
7.1.70.0300.00316.18
7.1.60.0330.00319.33
7.1.50.0330.01119.32
7.1.40.0410.00419.31
7.1.30.0350.00619.25
7.1.20.0330.00619.26
7.1.10.0350.00316.21
7.1.00.0430.00416.21
7.0.330.0140.00316.46
7.0.320.0120.00516.49
7.0.310.0120.00416.41
7.0.300.0120.00616.44
7.0.290.0140.00416.43
7.0.280.0090.00716.40
7.0.270.0120.00216.48
7.0.260.0070.00716.51
7.0.250.0120.00216.68
7.0.240.0100.00516.66
7.0.230.0140.00316.66
7.0.220.0150.00216.61
7.0.210.0100.00416.58
7.0.200.0120.00416.59
7.0.190.0110.00316.60
7.0.180.0120.00316.60
7.0.170.0110.00616.62
7.0.160.0090.00516.54
7.0.150.0140.00216.53
7.0.140.0090.00516.54
7.0.130.0070.00716.61
7.0.120.0100.00316.57
7.0.110.0120.00216.55
7.0.100.0120.00316.64
7.0.90.0110.00216.39
7.0.80.0090.00316.50
7.0.70.0100.00416.39
7.0.60.0090.00516.56
7.0.50.0120.00216.36
7.0.40.0060.00516.48
7.0.30.0090.00516.54
7.0.20.0100.00516.43
7.0.10.0090.00516.50
7.0.00.0080.00516.47
5.6.400.0070.00315.46
5.6.390.0100.00215.53
5.6.380.0100.00415.23
5.6.370.0080.00415.48
5.6.360.0080.00715.48
5.6.350.0100.00315.40
5.6.340.0100.00215.50
5.6.330.0060.00715.49
5.6.320.0050.00815.49
5.6.310.0090.00315.47
5.6.300.0090.00415.35
5.6.290.0080.00415.56
5.6.280.0110.00015.49
5.6.270.0090.00315.52
5.6.260.0110.00115.49
5.6.250.0070.00415.48
5.6.240.0090.00315.58
5.6.230.0080.00415.58
5.6.220.0090.00315.54
5.6.210.0090.00415.54
5.6.200.0090.00315.71
5.6.190.0080.00615.63
5.6.180.0110.00415.62
5.6.170.0120.00315.61
5.6.160.0080.00515.61
5.6.150.0130.00115.56
5.6.140.0100.00415.63
5.6.130.0100.00415.55
5.6.120.0110.00515.60
5.6.110.0100.00315.55
5.6.100.0100.00315.58
5.6.90.0070.00515.52
5.6.80.0070.00515.54
5.6.70.0090.00315.63
5.6.60.0100.00315.66
5.6.50.0100.00315.50
5.6.40.0060.00615.57
5.6.30.0070.00515.49
5.6.20.0060.00615.48
5.6.10.0080.00415.52
5.6.00.0080.00415.46
5.3.290.0100.00613.97

preferences:
46.98 ms | 403 KiB | 5 Q