3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $Y= new DateTime(null); $X= new DateTime(null); $S=$X->format('e'); echo($X->format('e') . "\n"); echo($X->format('d/m/Y') . "\n"); $X= new DateTime(null, $X->format('U')); $X->setTimeZone(new DateTimeZone()); echo($X->format('d/m/Y') . "\n"); echo($X->format('e') . "\n");
based on uPK09
Output for 7.0.20 - 7.2.0
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263980') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 7.0.6
Europe/Amsterdam 21/05/2016 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1463828740') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 7.0.5
Europe/Amsterdam 03/04/2016 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1459667383') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 7.0.4
Europe/Amsterdam 10/03/2016 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1457640933') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 7.0.3
Europe/Amsterdam 18/03/2016 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1458337047') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 7.0.2
Europe/Amsterdam 23/03/2016 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1458705057') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 7.0.1
Europe/Amsterdam 24/03/2016 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1458802785') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 7.0.0
Europe/Amsterdam 27/03/2016 Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1459065190') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.28
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263980') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.21
Europe/Amsterdam 02/05/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1462197723') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.20
Europe/Amsterdam 10/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1460268695') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.19
Europe/Amsterdam 08/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1457410984') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.18
Europe/Amsterdam 15/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1458047921') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.17
Europe/Amsterdam 20/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1458435062') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.16
Europe/Amsterdam 28/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1459154560') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.15
Europe/Amsterdam 29/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1459243902') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.14
Europe/Amsterdam 14/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1460646846') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.13
Europe/Amsterdam 15/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1460735586') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.12
Europe/Amsterdam 20/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461133323') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.11
Europe/Amsterdam 24/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461502069') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.10
Europe/Amsterdam 25/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461595997') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.9
Europe/Amsterdam 27/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461787834') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.6.8
Europe/Amsterdam 30/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461991827') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.35
Europe/Amsterdam 23/05/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1463960247') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.34
Europe/Amsterdam 11/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1460363104') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.33
Europe/Amsterdam 09/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1457508125') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.32
Europe/Amsterdam 17/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1458234878') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.31
Europe/Amsterdam 21/03/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1458532762') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.30
Europe/Amsterdam 01/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1459509850') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.29
Europe/Amsterdam 17/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1460873457') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.28
Europe/Amsterdam 21/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461231606') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.27
Europe/Amsterdam 22/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461323976') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.26
Europe/Amsterdam 26/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461692036') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.25
Europe/Amsterdam 29/04/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1461891486') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.5.24
Europe/Amsterdam 24/05/2016 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1464074607') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.45
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263983') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.44
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263984') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.41 - 5.4.43
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263985') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.40
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263986') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.38 - 5.4.39
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263987') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.35 - 5.4.37
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263988') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.3.29, 5.4.31 - 5.4.34
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263989') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.27 - 5.4.30
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263990') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.3.28, 5.4.23 - 5.4.26
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263991') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.4.19 - 5.4.22
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263992') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.3.25 - 5.3.27, 5.4.14 - 5.4.18
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263993') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.
Output for 5.3.21 - 5.3.24, 5.4.11 - 5.4.13
Europe/Amsterdam 28/12/2015 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/NdcDp:7 Stack trace: #0 /in/NdcDp(7): DateTime->__construct('', '1451263994') #1 {main} thrown in /in/NdcDp on line 7
Process exited with code 255.