3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fileDate = DateTime::createFromFormat("Ymd", "19350320"); $now = new DateTime("now"); echo $fileDate->format("Ymd"); echo $now->format("Ymd"); $diff1 = $now->diff($fileDate, true); echo $now->format("Ymd"); ?>
based on TfqGD
Output for 5.3.20 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
193503202015113020151130
Output for 7.0.6
193503202016052120160521
Output for 5.6.14, 7.0.5
193503202016041420160414
Output for 7.0.4
193503202016031020160310
Output for 7.0.3
193503202016031820160318
Output for 7.0.2
193503202016032320160323
Output for 7.0.1
193503202016032420160324
Output for 7.0.0
193503202016032720160327
Output for 5.6.21
193503202016050220160502
Output for 5.6.20
193503202016041020160410
Output for 5.6.19
193503202016030820160308
Output for 5.6.18
193503202016031520160315
Output for 5.6.17
193503202016032020160320
Output for 5.6.16
193503202016032820160328
Output for 5.6.15
193503202016032920160329
Output for 5.6.13
193503202016041520160415
Output for 5.6.12
193503202016042020160420
Output for 5.6.11
193503202016042420160424
Output for 5.6.10
193503202016042520160425
Output for 5.6.9
193503202016042820160428
Output for 5.6.8
193503202016043020160430
Output for 5.5.35
193503202016052320160523
Output for 5.5.34
193503202016041120160411
Output for 5.5.33
193503202016030920160309
Output for 5.5.32
193503202016031720160317
Output for 5.5.31
193503202016032120160321
Output for 5.5.30
193503202016040120160401
Output for 5.5.29
193503202016041720160417
Output for 5.5.28
193503202016042120160421
Output for 5.5.27
193503202016042220160422
Output for 5.5.26
193503202016042620160426
Output for 5.5.25
193503202016042920160429
Output for 5.5.24
193503202016052420160524