3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Prague'); $start = strtotime('1900-01-01 00:00:00'); $dates = array('2013-01-01 00:01:59', '2013-01-03 11:12:05', '2012-10-28 23:07:06'); foreach ($dates as $d) { $timestamp = strtotime($d); echo $timestamp - $start.PHP_EOL; echo floor(($timestamp - $start)/(60*60*24)) + 1.PHP_EOL.PHP_EOL; }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'PHP_EOL' (T_STRING), expecting ',' or ';' in /in/2LrRl on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/2LrRl on line 8
Process exited with code 255.

preferences:
175.62 ms | 1399 KiB | 67 Q