3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTime('Tue, 17 Dec 2013 07:23:56 +0000'); $date->setTimeZone(new \DateTimezone('Asia/Kolkata')); echo $date->format('D, d M Y H:i:s O');
Output for 5.3.0 - 7.1.0
Tue, 17 Dec 2013 12:53:56 +0530
Output for 5.2.6 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 3 Tue, 17 Dec 2013 12:53:56 +0530
Output for 5.2.0 - 5.2.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 3 Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (Asia/Kolkata)' in /in/TskJW:3 Stack trace: #0 /in/TskJW(3): DateTimeZone->__construct('Asia/Kolkata') #1 {main} thrown in /in/TskJW on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 3 Fatal error: Class 'DateTime' not found in /in/TskJW on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/TskJW on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/TskJW on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/TskJW on line 2