3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $old = new DateTime('2014-10-02'); $new = new DateTime(); echo $old->getTimeStamp() . PHP_EOL; echo $new->getTimeStamp() . PHP_EOL; echo 31536000;
based on OT39b
Output for 5.6.28, 7.0.20 - 7.2.0
1412200800 1443798460 31536000
Output for 7.0.6
1412200800 1462247290 31536000
Output for 7.0.5
1412200800 1459615986 31536000
Output for 7.0.4
1412200800 1457581810 31536000
Output for 7.0.3
1412200800 1458274338 31536000
Output for 7.0.2
1412200800 1458571165 31536000
Output for 7.0.1
1412200800 1458746124 31536000
Output for 7.0.0
1412200800 1459011694 31536000
Output for 5.6.21
1412200800 1462143161 31536000
Output for 5.6.20
1412200800 1460203776 31536000
Output for 5.6.19
1412200800 1457322894 31536000
Output for 5.6.18
1412200800 1457974342 31536000
Output for 5.6.17
1412200800 1458376533 31536000
Output for 5.6.16
1412200800 1459100865 31536000
Output for 5.6.15
1412200800 1459190424 31536000
Output for 5.6.14
1412200800 1459545080 31536000
Output for 5.6.13
1412200800 1460682773 31536000
Output for 5.6.12
1412200800 1461076902 31536000
Output for 5.6.11
1412200800 1461361022 31536000
Output for 5.6.10
1412200800 1461540579 31536000
Output for 5.6.9
1412200800 1461731414 31536000
Output for 5.6.8
1412200800 1461932504 31536000
Output for 5.6.7
1412200800 1464142675 31536000
Output for 5.5.35
1412200800 1463884795 31536000
Output for 5.5.34
1412200800 1460311598 31536000
Output for 5.5.33
1412200800 1457448350 31536000
Output for 5.5.32
1412200800 1458160811 31536000
Output for 5.5.31
1412200800 1458473174 31536000
Output for 5.5.30
1412200800 1459456908 31536000
Output for 5.5.29
1412200800 1460819905 31536000
Output for 5.5.28
1412200800 1461174254 31536000
Output for 5.5.27
1412200800 1461268958 31536000
Output for 5.5.26
1412200800 1461635608 31536000
Output for 5.5.25
1412200800 1461829875 31536000
Output for 5.5.24
1412200800 1464014643 31536000
Output for 5.4.44 - 5.4.45
1412200800 1443798471 31536000
Output for 5.4.38 - 5.4.43
1412200800 1443798472 31536000
Output for 5.4.31 - 5.4.37
1412200800 1443798473 31536000
Output for 5.4.24 - 5.4.30
1412200800 1443798474 31536000
Output for 5.4.18 - 5.4.23
1412200800 1443798475 31536000
Output for 5.4.11 - 5.4.17
1412200800 1443798476 31536000
Output for 5.4.8 - 5.4.10
1412200800 1443798477 31536000
Output for 5.4.7
1412200800 1445906380 31536000
Output for 5.4.6
1412200800 1445911074 31536000
Output for 5.4.5
1412200800 1445916688 31536000
Output for 5.4.4
1412200800 1445922269 31536000
Output for 5.4.3
1412200800 1445928375 31536000
Output for 5.4.2
1412200800 1445934584 31536000
Output for 5.3.29
1412200800 1446264959 31536000
Output for 5.3.28
1412200800 1446272666 31536000
Output for 5.3.27
1412200800 1446280369 31536000
Output for 5.3.26
1412200800 1446449410 31536000
Output for 5.3.25
1412200800 1446455687 31536000
Output for 5.3.24
1412200800 1446460598 31536000
Output for 5.3.23
1412200800 1446465314 31536000
Output for 5.3.22
1412200800 1446470757 31536000
Output for 5.3.21
1412200800 1446475642 31536000
Output for 5.3.20
1412200800 1446479127 31536000
Output for 5.3.19
1412200800 1446484338 31536000
Output for 5.3.18
1412200800 1446487438 31536000