3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Generates a range of dates */ function dateRange( $first, $last, $step = '+1 day', $format = 'l jS F Y' ) { $dates = array(); $current = strtotime( $first ); $last = strtotime( $last ); while( $current <= $last ) { $dates[] = date( $format, $current ); $current = strtotime( $step, $current ); } return $dates; } $Event_Date = '2015-08-09'; $Event_End_Date = '2015-08-19'; $availability_range = array(); $date_start = date('l jS F Y',strtotime($Event_Date)); $date_end = date('l jS F Y',strtotime($Event_End_Date)); $range = dateRange( $date_start, $date_end ); foreach ($range as $key => $date) { array_push($availability_range, $date); } print_r( $availability_range); foreach ($availability_range as $key => $date) { echo $date . ' ----'; }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Sunday 9th August 2015 [1] => Monday 10th August 2015 [2] => Tuesday 11th August 2015 [3] => Wednesday 12th August 2015 [4] => Thursday 13th August 2015 [5] => Friday 14th August 2015 [6] => Saturday 15th August 2015 [7] => Sunday 16th August 2015 [8] => Monday 17th August 2015 [9] => Tuesday 18th August 2015 [10] => Wednesday 19th August 2015 ) Sunday 9th August 2015 ----Monday 10th August 2015 ----Tuesday 11th August 2015 ----Wednesday 12th August 2015 ----Thursday 13th August 2015 ----Friday 14th August 2015 ----Saturday 15th August 2015 ----Sunday 16th August 2015 ----Monday 17th August 2015 ----Tuesday 18th August 2015 ----Wednesday 19th August 2015 ----

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:
53.12 ms | 402 KiB | 8 Q