3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = date('Y-m-d'); $start = strtotime('2013-12-25'); $end = strtotime('2013-12-26'); for($dates AS $date) { $timestamp = strtotime($date); if($timestamp >= $start && $timestamp <= $end) { echo "The date $date is within our date range\n"; } else { echo "The date $date is NOT within our date range\n"; } }
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'AS' (T_AS), expecting ';' in /in/fWCVf on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_AS, expecting ';' in /in/fWCVf on line 7
Process exited with code 255.

preferences:
185.74 ms | 1395 KiB | 61 Q