3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $maxdays = 1; for($daynumber=0;$daynumber<$maxdays;$daynumber++){ $currentdayval = "+".(string)($daynumber-$maxdays)." days"; $minutes=0; for($quarter=0;$quarter<24*4;$quarter++){ $minutes += $quarter*15; $currentminutesval = $minutes." minutes"; $date_sql = date("Y-m-d H:i:s",strtotime($currentdayval." + ".$currentminutesval)); //current date echo $date_sql. "\n"; }//for $quarter }//for $daynr
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.0.5, 5.2.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2014-06-26 14:30:21 2014-06-26 14:45:21 2014-06-26 15:15:21 2014-06-26 16:00:21 2014-06-26 17:00:21 2014-06-26 18:15:21 2014-06-26 19:45:21 2014-06-26 21:30:21 2014-06-26 23:30:21 2014-06-27 01:45:21 2014-06-27 04:15:21 2014-06-27 07:00:21 2014-06-27 10:00:21 2014-06-27 13:15:21 2014-06-27 16:45:21 2014-06-27 20:30:21 2014-06-28 00:30:21 2014-06-28 04:45:21 2014-06-28 09:15:21 2014-06-28 14:00:21 2014-06-28 19:00:21 2014-06-29 00:15:21 2014-06-29 05:45:21 2014-06-29 11:30:21 2014-06-29 17:30:21 2014-06-29 23:45:21 2014-06-30 06:15:21 2014-06-30 13:00:21 2014-06-30 20:00:21 2014-07-01 03:15:21 2014-07-01 10:45:21 2014-07-01 18:30:21 2014-07-02 02:30:21 2014-07-02 10:45:21 2014-07-02 19:15:21 2014-07-03 04:00:21 2014-07-03 13:00:21 2014-07-03 22:15:21 2014-07-04 07:45:21 2014-07-04 17:30:21 2014-07-05 03:30:21 2014-07-05 13:45:21 2014-07-06 00:15:21 2014-07-06 11:00:21 2014-07-06 22:00:21 2014-07-07 09:15:21 2014-07-07 20:45:21 2014-07-08 08:30:21 2014-07-08 20:30:21 2014-07-09 08:45:21 2014-07-09 21:15:21 2014-07-10 10:00:21 2014-07-10 23:00:21 2014-07-11 12:15:21 2014-07-12 01:45:21 2014-07-12 15:30:21 2014-07-13 05:30:21 2014-07-13 19:45:21 2014-07-14 10:15:21 2014-07-15 01:00:21 2014-07-15 16:00:21 2014-07-16 07:15:21 2014-07-16 22:45:21 2014-07-17 14:30:21 2014-07-18 06:30:21 2014-07-18 22:45:21 2014-07-19 15:15:21 2014-07-20 08:00:21 2014-07-21 01:00:21 2014-07-21 18:15:21 2014-07-22 11:45:21 2014-07-23 05:30:21 2014-07-23 23:30:21 2014-07-24 17:45:21 2014-07-25 12:15:21 2014-07-26 07:00:21 2014-07-27 02:00:21 2014-07-27 21:15:21 2014-07-28 16:45:21 2014-07-29 12:30:21 2014-07-30 08:30:21 2014-07-31 04:45:21 2014-08-01 01:15:21 2014-08-01 22:00:21 2014-08-02 19:00:21 2014-08-03 16:15:21 2014-08-04 13:45:21 2014-08-05 11:30:21 2014-08-06 09:30:21 2014-08-07 07:45:21 2014-08-08 06:15:21 2014-08-09 05:00:21 2014-08-10 04:00:21 2014-08-11 03:15:21 2014-08-12 02:45:21 2014-08-13 02:30:21
Output for 5.1.1 - 5.2.1
1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00 1970-01-01 01:00:00
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/DCrJF on line 14
Process exited with code 255.
Output for 5.0.0 - 5.0.2
2014-06-26 00:00:00 2014-06-26 00:15:00 2014-06-26 00:45:00 2014-06-26 01:30:00 2014-06-26 02:30:00 2014-06-26 03:45:00 2014-06-26 05:15:00 2014-06-26 07:00:00 2014-06-26 09:00:00 2014-06-26 11:15:00 2014-06-26 13:45:00 2014-06-26 16:30:00 2014-06-26 19:30:00 2014-06-26 22:45:00 2014-06-27 02:15:00 2014-06-27 06:00:00 2014-06-27 10:00:00 2014-06-27 14:15:00 2014-06-27 18:45:00 2014-06-27 23:30:00 2014-06-28 04:30:00 2014-06-28 09:45:00 2014-06-28 15:15:00 2014-06-28 21:00:00 2014-06-29 03:00:00 2014-06-29 09:15:00 2014-06-29 15:45:00 2014-06-29 22:30:00 2014-06-30 05:30:00 2014-06-30 12:45:00 2014-06-30 20:15:00 2014-07-01 04:00:00 2014-07-01 12:00:00 2014-07-01 20:15:00 2014-07-02 04:45:00 2014-07-02 13:30:00 2014-07-02 22:30:00 2014-07-03 07:45:00 2014-07-03 17:15:00 2014-07-04 03:00:00 2014-07-04 13:00:00 2014-07-04 23:15:00 2014-07-05 09:45:00 2014-07-05 20:30:00 2014-07-06 07:30:00 2014-07-06 18:45:00 2014-07-07 06:15:00 2014-07-07 18:00:00 2014-07-08 06:00:00 2014-07-08 18:15:00 2014-07-09 06:45:00 2014-07-09 19:30:00 2014-07-10 08:30:00 2014-07-10 21:45:00 2014-07-11 11:15:00 2014-07-12 01:00:00 2014-07-12 15:00:00 2014-07-13 05:15:00 2014-07-13 19:45:00 2014-07-14 10:30:00 2014-07-15 01:30:00 2014-07-15 16:45:00 2014-07-16 08:15:00 2014-07-17 00:00:00 2014-07-17 16:00:00 2014-07-18 08:15:00 2014-07-19 00:45:00 2014-07-19 17:30:00 2014-07-20 10:30:00 2014-07-21 03:45:00 2014-07-21 21:15:00 2014-07-22 15:00:00 2014-07-23 09:00:00 2014-07-24 03:15:00 2014-07-24 21:45:00 2014-07-25 16:30:00 2014-07-26 11:30:00 2014-07-27 06:45:00 2014-07-28 02:15:00 2014-07-28 22:00:00 2014-07-29 18:00:00 2014-07-30 14:15:00 2014-07-31 10:45:00 2014-08-01 07:30:00 2014-08-02 04:30:00 2014-08-03 01:45:00 2014-08-03 23:15:00 2014-08-04 21:00:00 2014-08-05 19:00:00 2014-08-06 17:15:00 2014-08-07 15:45:00 2014-08-08 14:30:00 2014-08-09 13:30:00 2014-08-10 12:45:00 2014-08-11 12:15:00 2014-08-12 12:00:00