3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateAdded = new DateTime('+ 13 seconds'); $now = new DateTime('now'); echo $dateAdded->getTimestamp() + $now->getTimestamp();
based on QV1Sg
Output for 5.6.28, 7.0.14 - 7.1.0
2826950575
Output for 7.0.6
2924473021
Output for 7.0.5
2919211685
Output for 7.0.4
2915140563
Output for 7.0.3
2916524251
Output for 7.0.2
2917118775
Output for 7.0.1
2917465939
Output for 7.0.0
2918001919
Output for 5.6.21
2924264439
Output for 5.6.20
2920386733
Output for 5.6.19
2914609727
Output for 5.6.18
2915908315
Output for 5.6.17
2916729253
Output for 5.6.16
2918180037
Output for 5.6.15
2918359269
Output for 5.6.14
2919069331
Output for 5.6.13
2921343241
Output for 5.6.12
2922129215
Output for 5.6.11
2922699975
Output for 5.6.10
2923057537
Output for 5.6.9
2923440409
Output for 5.6.8
2923840637
Output for 5.6.7
2928240429
Output for 5.5.35
2927744889
Output for 5.5.34
2920602321
Output for 5.5.33
2914873025
Output for 5.5.32
2916296493
Output for 5.5.31
2916922763
Output for 5.5.30
2918892215
Output for 5.5.29
2921617701
Output for 5.5.28
2922325663
Output for 5.5.27
2922516443
Output for 5.5.26
2923247145
Output for 5.5.25
2923636807
Output for 5.5.24
2924036271
Output for 5.4.45
2885681281
Output for 5.4.44
2885681271
Output for 5.4.43
2885681261
Output for 5.4.42
2872853855
Output for 5.4.41
2872853851
Output for 5.4.40
2872853841
Output for 5.4.39
2872853839
Output for 5.4.38
2872853837
Output for 5.4.37
2872853833
Output for 5.4.34 - 5.4.36
2872853831
Output for 5.4.29 - 5.4.32
2826950583
Output for 5.4.7 - 5.4.28
2826950585
Output for 5.3.16 - 5.4.6
2826950587
Output for 5.3.0 - 5.3.15
2826950589
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/dAniF on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/dAniF on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/dAniF on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/dAniF on line 2