3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $timezone = new DateTimeZone('EST'); $nowDate = new DateTime((string) $timestamp, $timezone); //echo $nowDate->format('Y'); $marketCloseTime = new DateTime('5PM', $timezone); //echo $marketCloseTime->format('Y-m-d H:i:s');
based on Jm7k2
Output for 5.2.0 - 7.1.0
Notice: Undefined variable: timestamp in /in/YXYWg on line 3
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/YXYWg on line 2
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/YXYWg on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/YXYWg on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/YXYWg on line 2