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").'\n'; echo $now->format("Ymd").'\n'; $diff1 = $now->diff($fileDate, true); echo $now->format("Ymd").'\n'; ?>
based on 7KS1P
Output for 5.3.20 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
19350320\n20151130\n20151130\n
Output for 7.0.6
19350320\n20160503\n20160503\n
Output for 7.0.5
19350320\n20160403\n20160403\n
Output for 7.0.4
19350320\n20160310\n20160310\n
Output for 7.0.3
19350320\n20160318\n20160318\n
Output for 7.0.2
19350320\n20160323\n20160323\n
Output for 7.0.1
19350320\n20160324\n20160324\n
Output for 7.0.0
19350320\n20160327\n20160327\n
Output for 5.6.21
19350320\n20160502\n20160502\n
Output for 5.6.20
19350320\n20160410\n20160410\n
Output for 5.6.19
19350320\n20160308\n20160308\n
Output for 5.6.18
19350320\n20160315\n20160315\n
Output for 5.6.17
19350320\n20160320\n20160320\n
Output for 5.6.16
19350320\n20160328\n20160328\n
Output for 5.6.15
19350320\n20160329\n20160329\n
Output for 5.6.14
19350320\n20160402\n20160402\n
Output for 5.6.13
19350320\n20160415\n20160415\n
Output for 5.6.12
19350320\n20160420\n20160420\n
Output for 5.6.11
19350320\n20160424\n20160424\n
Output for 5.6.10
19350320\n20160425\n20160425\n
Output for 5.6.9
19350320\n20160427\n20160427\n
Output for 5.6.8
19350320\n20160430\n20160430\n
Output for 5.5.35
19350320\n20160522\n20160522\n
Output for 5.5.34
19350320\n20160411\n20160411\n
Output for 5.5.33
19350320\n20160309\n20160309\n
Output for 5.5.32
19350320\n20160317\n20160317\n
Output for 5.5.31
19350320\n20160321\n20160321\n
Output for 5.5.30
19350320\n20160401\n20160401\n
Output for 5.5.29
19350320\n20160417\n20160417\n
Output for 5.5.28
19350320\n20160421\n20160421\n
Output for 5.5.27
19350320\n20160422\n20160422\n
Output for 5.5.26
19350320\n20160426\n20160426\n
Output for 5.5.25
19350320\n20160429\n20160429\n
Output for 5.5.24
19350320\n20160524\n20160524\n