3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date=(new DateTime())->format('Y-m-d H:i:s'); echo $date;
based on f94eS
Output for 5.5.0 - 5.6.38, hhvm-3.11.1, hhvm-3.13.2 - 3.15.4, hhvm-3.18.5 - 3.20.2, hhvm-3.21.3 - 3.22.0, 7.0.0 - 7.2.11
2015-11-08 12:33:47
Output for hhvm-3.10.1, hhvm-3.12.14, hhvm-3.17.3 - 3.18.4, hhvm-3.21.0
2015-11-08 12:33:48
Output for 5.4.45
2015-11-08 12:33:49
Output for 5.4.44
2015-11-08 12:33:50
Output for 5.4.43
2015-11-08 12:33:51
Output for 5.4.41 - 5.4.42
2015-11-08 12:33:52
Output for 5.4.38 - 5.4.40
2015-11-08 12:33:53
Output for 5.4.35 - 5.4.37
2015-11-08 12:33:54
Output for 5.4.29 - 5.4.34
2015-11-08 12:33:55
Output for 5.4.23 - 5.4.28
2015-11-08 12:33:56
Output for 5.4.18 - 5.4.22
2015-11-08 12:33:57
Output for 5.4.12 - 5.4.17
2015-11-08 12:33:58
Output for 5.4.9 - 5.4.11
2015-11-08 12:33:59
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/T4mWv on line 2
Process exited with code 255.