3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currentDate = date('m/d/Y'); $end_jan = strtotime('01/31/14'); $end_feb = strtotime('02/28/14'); $end_mar = strtotime('03/31/14'); $end_apr = strtotime('04/30/14'); $end_may = strtotime('05/31/14'); $end_jun = strtotime('06/30/14'); $end_jul = strtotime('07/31/14'); $end_aug = strtotime('08/31/14'); $end_sep = strtotime('09/30/14'); $end_oct = strtotime('10/31/14'); $end_nov = strtotime('11/30/14'); $end_dec = strtotime('12/31/14'); $current = strtotime($currentDate); $timestamp = strtotime($currentDate); if($timestamp >= $current && $timestamp <= $end_jan) { echo "The date $currentDate is in January";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in February";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in March";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in April";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in May";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in June";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in July";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in August";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in September";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in October";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in November";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in December";} else { echo "Something has gone wrong!"; }
Output for git.master, git.master_jit, rfc.property-hooks
The date 01/15/2014 is in January

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:
35.13 ms | 401 KiB | 8 Q