3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attendance = array( array( "student_id" => "1", "date" => "2016-04-24" ) ); $students = array( array( "student_id" => "1", "Reason" => "", "date" => "2016-04-24" ), array( "student_id" => "6", "Reason" => "1", "date" => "2016-04-24" ) ); $atts = array(); foreach($attendance as $att) { $atts[] = $att['student_id']; } foreach($students as &$student) { if(in_array($student['student_id'], $atts)) { $student['Reason']='1'; } else { $student['Reason']='0'; } } echo '<pre>',print_r($students,1),'</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.60.0120.00316.50
8.3.50.0070.01116.34
8.3.40.0080.00818.57
8.3.30.0100.00718.76
8.3.20.0080.00018.51
8.3.10.0070.00021.96
8.3.00.0060.00317.93
8.2.180.0180.00016.63
8.2.170.0170.00022.96
8.2.160.0070.00721.11
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0100.00017.79
8.2.120.0040.00426.35
8.2.110.0110.00719.27
8.2.100.0080.00417.91
8.2.90.0050.00319.21
8.2.80.0090.00017.97
8.2.70.0030.00617.50
8.2.60.0060.00318.05
8.2.50.0030.00518.10
8.2.40.0040.00420.63
8.2.30.0000.00718.11
8.2.20.0050.00317.66
8.2.10.0040.00418.18
8.2.00.0040.00418.19
8.1.280.0120.00625.92
8.1.270.0050.00324.00
8.1.260.0040.00428.09
8.1.250.0070.00328.09
8.1.240.0000.00922.01
8.1.230.0090.00317.89
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0070.00022.19
8.1.150.0000.00718.88
8.1.140.0030.00519.54
8.1.130.0050.00217.70
8.1.120.0020.00517.33
8.1.110.0040.00417.37
8.1.100.0050.00217.46
8.1.90.0000.00717.48
8.1.80.0030.00317.46
8.1.70.0000.00717.45
8.1.60.0050.00317.61
8.1.50.0040.00417.54
8.1.40.0040.00417.53
8.1.30.0040.00417.57
8.1.20.0040.00417.70
8.1.10.0000.00817.59
8.1.00.0050.00517.50
8.0.300.0080.00018.77
8.0.290.0070.00016.75
8.0.280.0040.00418.45
8.0.270.0060.00317.18
8.0.260.0000.00617.28
8.0.250.0030.00316.88
8.0.240.0000.00717.00
8.0.230.0070.00016.97
8.0.220.0070.00016.92
8.0.210.0000.00716.79
8.0.200.0070.00016.89
8.0.190.0040.00417.00
8.0.180.0030.00616.98
8.0.170.0060.00316.89
8.0.160.0070.00016.86
8.0.150.0050.00216.88
8.0.140.0080.00016.76
8.0.130.0030.00313.23
8.0.120.0000.00816.79
8.0.110.0000.00716.74
8.0.100.0000.00816.94
8.0.90.0050.00217.02
8.0.80.0080.01416.82
8.0.70.0070.00016.78
8.0.60.0000.00716.93
8.0.50.0040.00416.94
8.0.30.0120.00417.27
8.0.20.0100.00917.40
8.0.10.0030.00617.08
8.0.00.0110.00616.75
7.4.330.0000.00615.08
7.4.320.0000.00616.60
7.4.300.0060.00016.45
7.4.290.0030.00616.52
7.4.280.0080.00016.62
7.4.270.0000.00716.66
7.4.260.0040.00416.51
7.4.250.0000.00816.50
7.4.240.0000.00716.43
7.4.230.0070.00016.40
7.4.220.0100.01416.51
7.4.210.0030.01116.47
7.4.200.0040.00416.68
7.4.160.0080.00816.41
7.4.150.0200.00317.40
7.4.140.0120.00517.86
7.4.130.0100.00816.57
7.4.120.0070.01216.49
7.4.110.0130.00616.60
7.4.100.0110.00816.34
7.4.90.0100.00716.38
7.4.80.0070.01019.39
7.4.70.0100.00616.27
7.4.60.0060.01116.40
7.4.50.0070.01016.38
7.4.40.0090.00616.29
7.4.30.0100.00616.67
7.4.00.0080.00314.65
7.3.330.0000.00713.09
7.3.320.0030.00313.17
7.3.310.0000.00716.34
7.3.300.0060.00016.20
7.3.290.0070.00816.31
7.3.280.0080.01016.34
7.3.270.0030.02017.40
7.3.260.0130.00716.30
7.3.250.0160.00516.44
7.3.240.0090.01016.56
7.3.230.0130.00316.39
7.3.210.0130.00316.57
7.3.200.0030.01819.39
7.3.190.0080.00816.59
7.3.180.0080.01316.38
7.3.170.0120.00816.45
7.3.160.0190.00316.45
7.3.10.0090.00416.75
7.3.00.0090.00316.80
7.2.330.0030.01416.74
7.2.320.0110.00716.39
7.2.310.0140.00316.36
7.2.300.0120.00716.67
7.2.290.0070.01416.64
7.2.130.0050.00716.84
7.2.120.0050.00616.86
7.2.110.0060.00816.88
7.2.100.0030.00916.96
7.2.90.0100.00316.74
7.2.80.0060.00816.89
7.2.70.0030.01116.94
7.2.60.0090.00516.95
7.2.50.0040.01316.93
7.2.40.0060.00616.86
7.2.30.0050.00716.97
7.2.20.0040.00816.85
7.2.10.0090.00316.82
7.2.00.0060.00817.91
7.1.250.0040.00815.89
7.1.200.0000.01315.62
7.1.100.0000.01117.83
7.1.70.0050.00217.28
7.1.60.0130.01019.54
7.1.00.0000.08022.37
7.0.200.0050.00516.51
7.0.60.0130.05319.89
7.0.50.0200.05720.34
7.0.40.0330.06720.23
7.0.30.0370.07020.29
7.0.20.0230.06320.21
7.0.10.0270.05720.28
7.0.00.0230.06320.30
5.6.280.0000.07720.92
5.6.210.0270.05320.54
5.6.200.0170.05321.15
5.6.190.0270.05721.04
5.6.180.0330.05720.93
5.6.170.0230.05721.19
5.6.160.0200.06321.03
5.6.150.0370.04721.04
5.6.140.0270.05021.18
5.6.130.0200.08021.05
5.6.120.0170.05721.08
5.6.110.0130.07021.03
5.6.100.0170.06721.04
5.6.90.0300.05720.93
5.6.80.0300.05320.43
5.6.70.0230.08020.50
5.6.60.0230.05320.41
5.6.50.0200.06020.40
5.6.40.0230.05020.41
5.6.30.0130.05320.54
5.6.20.0400.04720.48
5.6.10.0170.06720.32
5.6.00.0230.05720.36
5.5.350.0270.04720.43
5.5.340.0100.05721.00
5.5.330.0270.06320.77
5.5.320.0170.06321.02
5.5.310.0330.05020.81
5.5.300.0300.05021.00
5.5.290.0270.05320.86
5.5.280.0100.06020.77
5.5.270.0200.05720.94
5.5.260.0230.06020.83
5.5.250.0200.07020.53
5.5.240.0270.05320.13
5.5.230.0200.05720.18
5.5.220.0270.04720.14
5.5.210.0170.06020.21
5.5.200.0130.05020.35
5.5.190.0100.06720.30
5.5.180.0130.06320.34
5.5.160.0170.06020.13
5.5.150.0300.05320.14
5.5.140.0300.05320.22
5.5.130.0300.04720.29
5.5.120.0270.07320.38
5.5.110.0270.07020.29
5.5.100.0230.05720.20
5.5.90.0230.05020.19
5.5.80.0230.05320.18
5.5.70.0230.05720.04
5.5.60.0370.05320.17
5.5.50.0330.04320.16
5.5.40.0270.05020.09
5.5.30.0470.06720.09
5.5.20.0370.07720.16
5.5.10.0300.05720.15
5.5.00.0270.05720.01

preferences:
57.72 ms | 401 KiB | 5 Q