3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lesson = array("143" => array("315", "311", "176", "145"), "13" => array("27", "25") ); $user = array( array("143" => array("145" => "1", "176" => "1")), array("13" => array("25" => "1")) ); $result = array(); foreach($user as $key => $value){ foreach($value as $key2 => $value2){ $result[$key2] = array_diff($lesson[$key2], array_keys($value2)); } } echo '<pre>'; print_r($result); echo '</pre>';

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.130.0080.00018.25
8.3.120.0120.00618.70
8.3.110.0090.00016.63
8.3.100.0040.00724.06
8.3.90.0060.00326.77
8.3.80.0060.00317.97
8.3.70.0090.00616.63
8.3.60.0060.01516.50
8.3.50.0110.00721.14
8.3.40.0090.00618.55
8.3.30.0060.00918.65
8.3.20.0030.00518.60
8.3.10.0040.00421.89
8.3.00.0030.00617.93
8.2.250.0100.01017.31
8.2.240.0060.00318.79
8.2.230.0060.00320.94
8.2.220.0030.00637.54
8.2.210.0040.01126.77
8.2.200.0030.00916.38
8.2.190.0100.00716.58
8.2.180.0110.00725.92
8.2.170.0070.00718.91
8.2.160.0090.00922.96
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00420.71
8.2.110.0060.00320.98
8.2.100.0000.01117.91
8.2.90.0080.00019.22
8.2.80.0030.00517.97
8.2.70.0040.00417.63
8.2.60.0000.00817.79
8.2.50.0060.00318.10
8.2.40.0080.00022.32
8.2.30.0030.00619.19
8.2.20.0050.00317.64
8.2.10.0020.00518.16
8.2.00.0040.00418.21
8.1.300.0030.00619.41
8.1.290.0090.00330.84
8.1.280.0120.00625.92
8.1.270.0060.00323.82
8.1.260.0040.00726.35
8.1.250.0000.00828.09
8.1.240.0040.00419.17
8.1.230.0040.00822.75
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0080.00017.23
8.1.180.0000.00918.10
8.1.170.0070.00018.80
8.1.160.0000.00718.93
8.1.150.0080.00018.99
8.1.140.0000.00719.58
8.1.130.0050.00217.75
8.1.120.0070.00017.40
8.1.110.0040.00417.47
8.1.100.0000.00717.48
8.1.90.0040.00417.34
8.1.80.0080.00017.35
8.1.70.0000.00717.41
8.1.60.0070.00317.46
8.1.50.0040.00717.59
8.1.40.0080.00017.57
8.1.30.0040.00417.49
8.1.20.0000.00817.57
8.1.10.0030.00617.54
8.1.00.0040.00417.42
8.0.300.0000.00918.77
8.0.290.0080.00016.75
8.0.280.0000.00718.39
8.0.270.0030.00317.32
8.0.260.0030.00317.16
8.0.250.0030.00316.99
8.0.240.0030.00317.02
8.0.230.0030.00316.90
8.0.220.0040.00416.80
8.0.210.0030.00616.77
8.0.200.0060.00016.92
8.0.190.0070.00216.83
8.0.180.0040.00416.91
8.0.170.0040.00416.96
8.0.160.0000.00716.94
8.0.150.0000.00816.81
8.0.140.0030.00516.77
8.0.130.0000.00813.35
8.0.120.0040.00416.80
8.0.110.0000.00716.88
8.0.100.0050.00216.93
8.0.90.0000.00816.99
8.0.80.0100.01316.90
8.0.70.0000.00716.69
8.0.60.0070.00016.93
8.0.50.0050.00216.76
8.0.30.0080.00916.98
8.0.20.0110.01117.40
8.0.10.0030.00517.01
8.0.00.0100.01016.82
7.4.330.0030.00315.08
7.4.320.0060.00016.53
7.4.300.0070.00016.59
7.4.290.0000.00816.63
7.4.280.0000.00716.38
7.4.270.0000.00916.43
7.4.260.0070.00016.52
7.4.250.0000.00716.47
7.4.240.0070.00016.64
7.4.230.0000.00716.53
7.4.220.0040.02116.46
7.4.210.0060.00916.54
7.4.200.0030.00316.49
7.4.160.0090.00616.42
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0070.01016.51
7.4.120.0100.00616.68
7.4.110.0060.01616.50
7.4.100.0030.01316.64
7.4.90.0060.01216.55
7.4.80.0130.00719.39
7.4.70.0120.00416.41
7.4.60.0030.01316.40
7.4.50.0090.00916.77
7.4.40.0000.01816.65
7.4.30.0100.01316.39
7.4.00.0090.00614.74
7.3.330.0000.00613.25
7.3.320.0000.00513.16
7.3.310.0040.00416.24
7.3.300.0000.00716.34
7.3.290.0030.00316.26
7.3.280.0080.01016.36
7.3.270.0180.00317.40
7.3.260.0070.01016.29
7.3.250.0070.01116.44
7.3.240.0110.00816.41
7.3.230.0040.01316.50
7.3.210.0070.01016.29
7.3.200.0150.00319.39
7.3.190.0160.01016.55
7.3.180.0140.00416.50
7.3.170.0160.00516.37
7.3.160.0100.01016.25
7.2.330.0060.01216.54
7.2.320.0090.01216.66
7.2.310.0090.00816.76
7.2.300.0140.00316.58
7.2.290.0140.00716.51
7.2.60.0070.00317.05
7.2.00.0050.00519.31
7.1.200.0060.00315.90
7.1.100.0030.00518.25
7.1.70.0040.00417.20
7.1.60.0070.01719.25
7.1.00.0030.07722.51
7.0.200.0040.00416.63
7.0.60.0170.07321.74
7.0.50.0200.06020.22
7.0.40.0370.05020.42
7.0.30.0170.05720.29
7.0.20.0070.06720.34
7.0.10.0200.05020.27
7.0.00.0200.06020.29
5.6.280.0030.07321.02
5.6.210.0170.06320.52
5.6.200.0070.06721.17
5.6.190.0470.04321.21
5.6.180.0330.05021.08
5.6.170.0070.06721.12
5.6.160.0130.06321.12
5.6.150.0100.06321.21
5.6.140.0370.04321.21
5.6.130.0230.06021.05
5.6.120.0400.05021.04
5.6.110.0230.06321.05
5.6.100.0230.06021.04
5.6.90.0300.05020.99
5.6.80.0200.05720.49
5.6.70.0070.06320.58
5.6.60.0130.05720.52
5.6.50.0200.05020.55
5.6.40.0200.04720.40
5.6.30.0100.06020.45
5.6.20.0230.04720.42
5.6.10.0230.04720.39
5.6.00.0030.06720.39
5.5.350.3800.04320.34
5.5.340.0270.05320.88
5.5.330.0330.05320.73
5.5.320.0270.04320.84
5.5.310.0170.05720.87
5.5.300.0070.06320.83
5.5.290.0070.06720.71
5.5.280.0230.05320.88
5.5.270.0130.07020.99
5.5.260.0170.06720.84
5.5.250.0200.05720.61
5.5.240.0230.04320.26
5.5.230.0130.06020.18
5.5.220.0170.05320.20
5.5.210.0200.04720.24
5.5.200.0230.04720.17
5.5.190.0200.05320.22
5.5.180.0100.06320.22
5.5.160.0130.06320.18
5.5.150.0200.05020.06
5.5.140.0200.04320.36
5.5.130.0170.05320.06
5.5.120.0130.05320.21
5.5.110.0200.04720.30
5.5.100.0270.04720.05
5.5.90.0270.05719.95
5.5.80.0170.05020.08
5.5.70.0170.05720.11
5.5.60.0170.05320.27
5.5.50.0300.06020.18
5.5.40.0200.06720.26
5.5.30.0130.05320.05
5.5.20.0200.08020.04
5.5.10.0200.08020.12
5.5.00.0270.06720.18

preferences:
28.77 ms | 403 KiB | 5 Q