3v4l.org

run code in 300+ PHP versions simultaneously
<?php $table = array( array( "name" => "1", "age" => 10, "answer" => "One" ), array( "name" => "2", "age" => 20, "answer" => "Two" ) ); $input = array( "name" => "2", "age" => 20 ); $isEntryMatches = array_reduce($table, function($result, $entry) use ($input) { $isValuesMatches = array_reduce($entry, function($result, $value) use ($input) { return $result && $value[key($value)] == $input[key($value)]; }, true); }, true); print $isEntryMatches;

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.70.0060.00918.43
8.3.60.0070.01018.56
8.3.50.0120.00522.97
8.3.40.0090.00919.02
8.3.30.0070.00718.90
8.3.20.0080.00020.34
8.3.10.0000.00821.77
8.3.00.0000.00817.80
8.2.180.0100.01016.63
8.2.170.0070.01022.96
8.2.160.0150.00320.34
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00826.16
8.2.120.0070.00020.83
8.2.110.0060.00322.43
8.2.100.0080.00417.78
8.2.90.0040.00419.18
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0060.00317.80
8.2.50.0050.00318.07
8.2.40.0000.00817.92
8.2.30.0000.00718.14
8.2.20.0040.00417.76
8.2.10.0000.00818.01
8.2.00.0020.00517.92
8.1.280.0120.00925.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00923.88
8.1.230.0030.00919.16
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0030.00518.10
8.1.170.0000.00818.50
8.1.160.0070.00022.04
8.1.150.0050.00318.80
8.1.140.0040.00417.54
8.1.130.0030.00317.77
8.1.120.0000.00717.51
8.1.110.0000.00717.45
8.1.100.0080.00017.52
8.1.90.0030.00717.51
8.1.80.0050.00317.37
8.1.70.0040.00417.45
8.1.60.0030.00517.61
8.1.50.0030.00617.49
8.1.40.0070.00317.42
8.1.30.0000.00817.70
8.1.20.0030.00517.69
8.1.10.0050.00217.52
8.1.00.0040.00417.57
8.0.300.0060.00318.77
8.0.290.0040.00416.63
8.0.280.0000.00718.49
8.0.270.0070.00017.34
8.0.260.0000.00717.22
8.0.250.0030.00317.06
8.0.240.0040.00416.98
8.0.230.0040.00416.97
8.0.220.0000.00717.00
8.0.210.0080.00017.01
8.0.200.0030.00317.04
8.0.190.0050.00217.07
8.0.180.0040.00417.03
8.0.170.0030.00517.08
8.0.160.0040.00416.88
8.0.150.0050.00216.80
8.0.140.0040.00416.96
8.0.130.0000.00613.36
8.0.120.0090.00016.80
8.0.110.0050.00216.86
8.0.100.0000.00816.98
8.0.90.0000.00817.07
8.0.80.0080.01517.01
8.0.70.0070.00016.82
8.0.60.0000.00716.84
8.0.50.0000.00817.00
8.0.30.0110.00817.08
8.0.20.0090.01017.40
8.0.10.0040.00417.07
8.0.00.0140.00816.86
7.4.330.0050.00015.09
7.4.320.0030.00316.36
7.4.300.0060.00316.42
7.4.290.0070.00016.60
7.4.280.0080.00016.44
7.4.270.0070.00016.61
7.4.260.0040.00416.61
7.4.250.0070.00016.52
7.4.240.0040.00316.50
7.4.230.0030.00316.60
7.4.220.0160.01016.54
7.4.210.0100.00416.40
7.4.200.0000.00716.60
7.4.160.0120.00916.58
7.4.150.0040.01517.40
7.4.140.0090.00917.86
7.4.130.0080.00816.45
7.4.120.0070.01016.43
7.4.110.0130.00416.70
7.4.100.0100.00716.49
7.4.90.0110.00716.70
7.4.80.0090.00819.39
7.4.70.0040.01416.80
7.4.60.0070.01016.41
7.4.50.0030.00616.48
7.4.40.0100.00716.32
7.4.30.0040.01216.65
7.4.00.0090.00315.08
7.3.330.0030.00313.41
7.3.320.0030.00313.40
7.3.310.0050.00316.23
7.3.300.0040.00416.28
7.3.290.0060.00916.44
7.3.280.0090.00816.39
7.3.270.0100.00717.40
7.3.260.0140.00416.42
7.3.250.0080.00916.50
7.3.240.0110.01016.41
7.3.230.0120.00416.39
7.3.210.0100.00716.59
7.3.200.0110.00919.39
7.3.190.0130.00316.66
7.3.180.0140.00316.46
7.3.170.0080.00816.50
7.3.160.0110.01116.54
7.3.10.0090.00616.67
7.3.00.0080.00616.63
7.2.330.0090.01216.57
7.2.320.0090.01216.45
7.2.310.0120.01216.80
7.2.300.0070.01316.46
7.2.290.0040.01216.36
7.2.130.0090.00616.74
7.2.120.0060.00616.55
7.2.110.0100.00317.03
7.2.100.0100.00317.11
7.2.90.0060.00617.01
7.2.80.0040.01217.00
7.2.70.0120.00316.48
7.2.60.0000.01416.87
7.2.50.0140.00416.77
7.2.40.0080.00716.98
7.2.30.0070.01016.92
7.2.20.0030.00716.93
7.2.10.0040.01117.05
7.2.00.0070.00718.26
7.1.250.0090.00615.54
7.1.100.0060.00918.03
7.1.70.0090.00017.27
7.1.60.0040.00719.40
7.1.50.0100.01416.93
7.1.00.0000.08022.30
7.0.200.0040.00416.88
7.0.140.0070.06322.19
7.0.60.0030.04019.89
7.0.50.0030.05317.92
7.0.40.0030.08020.25
7.0.30.0270.05020.17
7.0.20.0230.06320.22
7.0.10.0030.09020.30
7.0.00.0070.03720.22
5.6.280.0100.06721.02
5.6.210.0100.06720.45
5.6.200.0030.08018.18
5.6.190.0170.07720.61
5.6.180.3730.04320.48
5.6.170.0300.06320.44
5.6.160.0030.04320.54
5.6.150.0070.07318.18
5.6.140.0030.04718.18
5.6.130.0030.04318.16
5.6.120.0030.04020.97
5.6.110.0130.08321.12
5.6.100.0000.08021.12
5.6.90.0000.04320.89
5.6.80.0100.04020.52
5.6.70.4130.04020.35
5.5.350.0300.07020.38
5.5.340.0100.07718.09
5.5.330.0100.05320.40
5.5.320.2600.04320.38
5.5.310.0200.04320.24
5.5.300.0000.04317.98
5.5.290.0130.08017.95
5.5.280.0130.07320.81
5.5.270.0070.03720.88
5.5.260.0030.04020.98
5.5.250.0070.08320.72
5.5.240.0330.04720.20
5.4.450.0400.05019.17
5.4.440.0330.04719.57
5.4.430.0600.04019.47
5.4.420.0470.04719.48
5.4.410.0170.03719.39
5.4.400.0170.03318.98
5.4.390.0400.05319.22
5.4.380.0570.08018.59
5.4.370.0370.05318.74
5.4.360.0270.05318.73
5.4.350.0430.06318.72
5.4.340.0300.04318.73
5.4.320.0060.03612.51
5.4.310.0050.04012.50
5.4.300.0080.03912.51
5.4.290.0050.03912.51
5.4.280.0050.03712.40
5.4.270.0080.03512.40
5.4.260.0070.03712.41
5.4.250.0040.03912.41
5.4.240.0050.03612.41
5.4.230.0070.03612.39
5.4.220.0080.03312.39
5.4.210.0080.03412.39
5.4.200.0070.03812.39
5.4.190.0060.04212.39
5.4.180.0070.04212.39
5.4.170.0070.03512.40
5.4.160.0060.03612.40
5.4.150.0050.03712.39
5.4.140.0060.03912.07
5.4.130.0070.03312.06
5.4.120.0050.03512.02
5.4.110.0080.03412.01
5.4.100.0110.03012.02
5.4.90.0070.03512.01
5.4.80.0020.04012.02
5.4.70.0080.03312.01
5.4.60.0020.03812.02
5.4.50.0060.03712.01
5.4.40.0010.03912.00
5.4.30.0140.03212.00
5.4.20.0060.03912.00
5.4.10.0060.03612.00
5.4.00.0060.03611.49
5.3.290.0070.03912.80
5.3.280.0030.04112.71
5.3.270.0050.04012.73
5.3.260.0050.04012.72
5.3.250.0040.03912.72
5.3.240.0030.04012.72
5.3.230.0060.03712.71
5.3.220.0090.03412.68
5.3.210.0060.03912.68
5.3.200.0070.03712.68
5.3.190.0060.03712.68
5.3.180.0050.03712.68
5.3.170.0070.03512.67
5.3.160.0040.03812.67
5.3.150.0070.04512.67
5.3.140.0050.03612.66
5.3.130.0060.03812.66
5.3.120.0090.04212.65
5.3.110.0060.03812.65
5.3.100.0100.03212.12
5.3.90.0070.03512.10
5.3.80.0050.03612.10
5.3.70.0070.03512.10
5.3.60.0070.03512.08
5.3.50.0080.04212.03
5.3.40.0070.03912.04
5.3.30.0100.03812.00
5.3.20.0070.03311.77
5.3.10.0030.03911.73
5.3.00.0080.03411.73
5.2.170.0030.0329.19
5.2.160.0040.0339.18
5.2.150.0030.0349.18
5.2.140.0060.0299.18
5.2.130.0050.0299.14
5.2.120.0030.0309.14
5.2.110.0050.0299.15
5.2.100.0040.0299.14
5.2.90.0030.0319.14
5.2.80.0100.0249.13
5.2.70.0070.0279.14
5.2.60.0060.0329.09
5.2.50.0080.0339.07
5.2.40.0040.0309.04
5.2.30.0070.0279.01
5.2.20.0040.0309.01
5.2.10.0050.0318.92
5.2.00.0050.0298.79
5.1.60.0040.0248.07
5.1.50.0040.0258.07
5.1.40.0040.0278.04
5.1.30.0060.0278.40
5.1.20.0050.0318.42
5.1.10.0020.0288.15
5.1.00.0010.0298.14
5.0.50.0030.0216.62
5.0.40.0020.0206.48
5.0.30.0050.0296.30
5.0.20.0020.0206.26
5.0.10.0020.0206.24
5.0.00.0030.0306.23
4.4.90.0010.0174.77
4.4.80.0040.0144.76
4.4.70.0040.0194.75
4.4.60.0040.0134.75
4.4.50.0020.0154.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0000.0184.84
4.4.10.0030.0214.85
4.4.00.0060.0214.76
4.3.110.0010.0174.67
4.3.100.0030.0154.67
4.3.90.0050.0124.63
4.3.80.0040.0224.58
4.3.70.0030.0144.63
4.3.60.0050.0124.63
4.3.50.0020.0174.63
4.3.40.0010.0264.53
4.3.30.0030.0143.28
4.3.20.0010.0163.26
4.3.10.0010.0163.22
4.3.00.0070.01315.89

preferences:
40.03 ms | 401 KiB | 5 Q