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>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [0] => Array ( [student_id] => 1 [Reason] => 1 [date] => 2016-04-24 ) [1] => Array ( [student_id] => 6 [Reason] => 0 [date] => 2016-04-24 ) ) </pre>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
58.17 ms | 401 KiB | 8 Q