3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "datetime: " . date('Y-m-d H:i:s Z') . "\n"; echo "time: " . time() . "\n"; $date = DateTime::createFromFormat('Y-m-d H:i:s Z', '2016-01-07 22:28:34 +0900'); echo "datetime with offset: " . date('Y-m-d H:i:s Z', $date->format(DateTime::RFC2822) + 32400) . "\n"; echo "date now: " . date('Y-m-d H:i:s');
Output for 7.3.0 - 7.3.3, 7.3.5 - 7.3.12, 7.4.0
datetime: 2016-01-07 22:42:40 3600 time: 1452202960 Fatal error: Uncaught Error: Call to a member function format() on bool in /in/2YQ85:5 Stack trace: #0 {main} thrown in /in/2YQ85 on line 5
Process exited with code 255.
Output for 7.3.4
datetime: 2016-01-07 22:42:41 3600 time: 1452202961 Fatal error: Uncaught Error: Call to a member function format() on bool in /in/2YQ85:5 Stack trace: #0 {main} thrown in /in/2YQ85 on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.4, 7.0.6 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25
datetime: 2016-01-07 22:42:40 3600 time: 1452202960 Fatal error: Uncaught Error: Call to a member function format() on boolean in /in/2YQ85:5 Stack trace: #0 {main} thrown in /in/2YQ85 on line 5
Process exited with code 255.
Output for 7.0.5
datetime: 2016-01-07 22:42:41 3600 time: 1452202961 Fatal error: Uncaught Error: Call to a member function format() on boolean in /in/2YQ85:5 Stack trace: #0 {main} thrown in /in/2YQ85 on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.28
datetime: 2016-01-07 22:42:40 3600 time: 1452202960 Fatal error: Call to a member function format() on boolean in /in/2YQ85 on line 5
Process exited with code 255.
Output for 5.5.0 - 5.5.19, 5.5.21 - 5.5.37
datetime: 2016-01-07 22:42:40 3600 time: 1452202960 Fatal error: Call to a member function format() on a non-object in /in/2YQ85 on line 5
Process exited with code 255.
Output for 5.5.20
datetime: 2016-01-07 22:42:41 3600 time: 1452202961 Fatal error: Call to a member function format() on a non-object in /in/2YQ85 on line 5
Process exited with code 255.

preferences:
106.44 ms | 401 KiB | 116 Q