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-m-d H:i:s'); echo $marketCloseTime = new DateTime('5PM', $timezone); echo $marketCloseTime->format('Y-m-d H:i:s');
based on ZYN1p
Output for 7.1.0
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2014-10-01 10:57:15 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.28, 7.0.14
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2014-10-01 10:57:15 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 7.0.6
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-05-02 20:27:45 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 7.0.5
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-02 09:40:43 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 7.0.4
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-09 20:19:54 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 7.0.3
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-17 20:32:41 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 7.0.2
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-21 07:06:18 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 7.0.1
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-23 07:18:51 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 7.0.0
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-26 09:42:03 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-11 02:06:48 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for hhvm-3.10.0
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-29 14:43:00 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.21
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-05-01 15:30:28 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.20
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-09 04:53:48 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.19
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-06 19:03:17 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.18
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-14 06:57:53 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.17
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-19 01:00:58 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.16
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-27 10:27:17 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.15
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-28 11:20:01 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.14
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-01 13:55:36 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.13
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-14 17:52:53 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.12
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-19 06:57:25 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.11
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-22 14:14:13 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.10
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-24 15:52:24 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.9
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-26 21:04:45 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.8
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-29 04:47:39 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.6.7
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-05-24 16:13:53 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.35
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-05-21 18:54:44 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.34
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-10 10:50:52 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.33
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-08 07:12:07 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.32
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-16 12:55:05 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.31
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-20 03:52:51 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.30
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-03-31 13:21:27 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.29
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-16 07:53:48 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.28
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-20 10:15:29 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.27
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-21 12:42:58 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.26
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-25 18:21:52 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.25
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-28 00:22:25 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.5.24
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2016-04-30 07:48:40 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.45
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-09-21 08:36:50 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.44
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-09-21 08:36:29 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.43
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-09-21 08:36:06 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.42
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-09-21 08:35:58 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.41
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-09-21 08:35:48 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.40
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-09-21 08:35:38 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.39
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-09-21 08:35:31 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.38
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-03-15 06:20:09 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.35 - 5.4.37
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-03-15 06:19:59 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.34
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2015-03-15 06:19:58 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.24 - 5.4.32
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2014-10-01 11:57:19 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.4.4 - 5.4.23
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2014-10-01 11:57:20 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.3.13 - 5.4.3
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2014-10-01 11:57:21 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.2.8 - 5.3.12
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2014-10-01 11:57:22 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.2.0 - 5.2.7
Notice: Undefined variable: timestamp in /in/Orpd7 on line 3 2014-10-01 11:57:23 Catchable fatal error: Object of class DateTime could not be converted to string in /in/Orpd7 on line 6
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/Orpd7 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/Orpd7 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/Orpd7 on line 2