3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $starttime='1899-12-30T16:30:00'; echo $starttime . "\n\r"; echo 'strart: ' . date('H:i:s', strtotime($starttime)) . "\n\r"; echo "\n\r"; $end = '1899-12-30T16:45:00'; echo 'end: ' . date('H:i:s',strtotime($end)); date_default_timezone_set('America/New_York'); $starttime='1899-12-30T16:30:00'; echo $starttime . "\n\r"; echo date('H:i:s', strtotime($starttime)) . "\n\r";
Output for 5.2.6 - 7.1.0
1899-12-30T16:30:00 strart: 16:30:00 end: 16:45:001899-12-30T16:30:00 16:30:00
Output for 5.1.0 - 5.2.5
1899-12-30T16:30:00 strart: 01:00:00 end: 01:00:001899-12-30T16:30:00 19:00:00
Output for 5.0.0 - 5.0.5
1899-12-30T16:30:00 strart: 16:30:00 end: 16:45:00 Fatal error: Call to undefined function date_default_timezone_set() in /in/eN416 on line 10
Process exited with code 255.
Output for 4.4.5 - 4.4.9
1899-12-30T16:30:00 strart: 23:49:32 end: 00:04:32 Fatal error: Call to undefined function: date_default_timezone_set() in /in/eN416 on line 10
Process exited with code 255.
Output for 4.3.5 - 4.4.4
1899-12-30T16:30:00 strart: 23:49:32 end: 00:04:32 Fatal error: Call to undefined function: date_default_timezone_set() in /in/eN416 on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
1899-12-30T16:30:00 strart: 09:49:32 end: 10:04:32 Fatal error: Call to undefined function: date_default_timezone_set() in /in/eN416 on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
1899-12-30T16:30:00 strart: 09:49:32 end: 10:04:32 Fatal error: Call to undefined function: date_default_timezone_set() in /in/eN416 on line 10