3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); echo $date->format('Ymd');
Output for 5.2.0 - 5.3.28, 5.4.0 - 5.4.27, 5.6.28, 7.0.14 - 7.1.0
20140411
Output for 7.0.6
20160503
Output for 7.0.5
20160402
Output for 7.0.4
20160310
Output for 7.0.3
20160318
Output for 7.0.2
20160321
Output for 7.0.1
20160323
Output for 7.0.0
20160326
Output for 5.6.21
20160501
Output for 5.6.20
20160409
Output for 5.6.19
20160306
Output for 5.6.18
20160314
Output for 5.6.17
20160319
Output for 5.6.16
20160327
Output for 5.6.15
20160328
Output for 5.6.14
20160401
Output for 5.6.13
20160414
Output for 5.6.12
20160419
Output for 5.6.11
20160422
Output for 5.6.10
20160424
Output for 5.6.9
20160427
Output for 5.6.8
20160429
Output for 5.6.7
20160524
Output for 5.5.35
20160522
Output for 5.5.34
20160410
Output for 5.5.33
20160308
Output for 5.5.32
20160316
Output for 5.5.31
20160320
Output for 5.5.30
20160331
Output for 5.5.29
20160416
Output for 5.5.28
20160420
Output for 5.5.27
20160421
Output for 5.5.26
20160426
Output for 5.5.25
20160428
Output for 5.5.24
20160430
Output for 5.4.44 - 5.4.45
20150919
Output for 5.4.41 - 5.4.43
20150713
Output for 5.4.39 - 5.4.40
20150515
Output for 5.4.38
20150302
Output for 5.4.34 - 5.4.37
20150209
Output for 5.3.29, 5.4.28 - 5.4.32
20140909
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/dpSnN on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/dpSnN on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/dpSnN on line 3