3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $currentDate = date('m/d/Y'); $currentDate = date('m/d/Y'); $start = strtotime('01/12/14'); $end = strtotime('02/12/14'); $end_jan = strtotime('01/31/Y); $current = strtotime($currentDate); $timestamp = strtotime($currentDate); if($timestamp >= $current && $timestamp <= $end_jan) { echo $currentDate; echo "The date $currentDate is in January"; } else { echo " timestamp is $timestamp"; echo "start is $start"; echo "end is $end "; echo "The date $currentDate is NOT within our date range\n"; }
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected ''01/31/Y);' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /in/prCiI on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /in/prCiI on line 8
Process exited with code 255.