3v4l.org

run code in 300+ PHP versions simultaneously
<?php $activities= array("Date,Num_Days,Event,Location","3/3/2018,1,Rosary of the Unborn,In Front of Planned Parenthood","4/4/2018,2,Sell Raffle Tickets,St. Eugene Church"); $monthNames = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $omonth = -1; $start = TRUE; print_r ($activities); print_r ($monthNames); print_r ($omonth); if ($start == True) {; print_r ("TRUE"); } $today = new DateTime("yesterday"); print_r ($today); $len_activities=sizeof($activities); for ($i = 1; $i < $len_activities; $i++) { $activity = $activities[$i]; print_r ($activity . "\n"); $activity = $activities[$i]; $activity_array = str_getcsv ($activity,",") ; print_r ($activity_array); $d = new DateTime($activity_array[0]); print_r ($d); $month = $d->format("n"); print_r ("\n".$month."\n"); }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Date,Num_Days,Event,Location [1] => 3/3/2018,1,Rosary of the Unborn,In Front of Planned Parenthood [2] => 4/4/2018,2,Sell Raffle Tickets,St. Eugene Church ) Array ( [0] => January [1] => February [2] => March [3] => April [4] => May [5] => June [6] => July [7] => August [8] => September [9] => October [10] => November [11] => December ) -1TRUEDateTime Object ( [date] => 2018-03-26 00:00:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 3/3/2018,1,Rosary of the Unborn,In Front of Planned Parenthood Array ( [0] => 3/3/2018 [1] => 1 [2] => Rosary of the Unborn [3] => In Front of Planned Parenthood ) DateTime Object ( [date] => 2018-03-03 00:00:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 3 4/4/2018,2,Sell Raffle Tickets,St. Eugene Church Array ( [0] => 4/4/2018 [1] => 2 [2] => Sell Raffle Tickets [3] => St. Eugene Church ) DateTime Object ( [date] => 2018-04-04 00:00:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 4

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:
65.49 ms | 403 KiB | 8 Q