3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array( "name" => "MCLE 201", "date-begin" => "2015-06-29", "date-end" => "2015-06-29" ), array( "name" => "MCLE 201", "date-begin" => "2015-07-29", "date-end" => "2015-07-29" ), array( "name" => "MCLE 201", "date-begin" => "2015-08-29", "date-end" => "2015-08-29" ), array( "name" => "MCLE 201", "date-begin" => "2015-09-29", "date-end" => "2015-09-29" ) ); $postedDateBegin = "2015-06-29"; $postedDateEnd = "2015-08-29"; $filterArray = array(); foreach($arr as $key=>$val){ if(strtotime($val['date-begin']) >= strtotime($postedDateBegin) && strtotime($val['date-end']) <= strtotime($postedDateEnd)){ $filterArray[] = $val; } } echo "<pre>"; print_r($filterArray);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [0] => Array ( [name] => MCLE 201 [date-begin] => 2015-06-29 [date-end] => 2015-06-29 ) [1] => Array ( [name] => MCLE 201 [date-begin] => 2015-07-29 [date-end] => 2015-07-29 ) [2] => Array ( [name] => MCLE 201 [date-begin] => 2015-08-29 [date-end] => 2015-08-29 ) )

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:
159.58 ms | 406 KiB | 5 Q