3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fecha = new DateTime(); echo $fecha->getTimestamp();
Output for 5.6.28, 7.0.20 - 7.2.0
1441146540
Output for 7.0.6
1462275602
Output for 7.0.5
1459642872
Output for 7.0.4
1457611947
Output for 7.0.3
1458306301
Output for 7.0.2
1458672970
Output for 7.0.1
1458774565
Output for 7.0.0
1459039564
Output for 5.6.21
1462171925
Output for 5.6.20
1460243811
Output for 5.6.19
1457381768
Output for 5.6.18
1458018070
Output for 5.6.17
1458407057
Output for 5.6.16
1459129044
Output for 5.6.15
1459218723
Output for 5.6.14
1459571921
Output for 5.6.13
1460709713
Output for 5.6.12
1461106549
Output for 5.6.11
1461389886
Output for 5.6.10
1461569158
Output for 5.6.9
1461760285
Output for 5.6.8
1461962629
Output for 5.5.35
1463913533
Output for 5.5.34
1460338411
Output for 5.5.33
1457478575
Output for 5.5.32
1458203256
Output for 5.5.31
1458503237
Output for 5.5.30
1459484763
Output for 5.5.29
1460847488
Output for 5.5.28
1461204504
Output for 5.5.27
1461298582
Output for 5.5.26
1461664964
Output for 5.5.25
1461860888
Output for 5.5.24
1464046895
Output for 5.4.45
1441554388
Output for 5.4.44
1441203859
Output for 5.4.36 - 5.4.43
1441203860
Output for 5.4.28 - 5.4.35
1441203861
Output for 5.4.20 - 5.4.27
1441203862
Output for 5.4.13 - 5.4.19
1441203863
Output for 5.4.6 - 5.4.12
1441203864
Output for 5.3.28 - 5.4.5
1441203865
Output for 5.3.21 - 5.3.27
1441203866
Output for 5.3.14 - 5.3.20
1441203867
Output for 5.3.5 - 5.3.13
1441203868
Output for 5.3.0 - 5.3.4
1441203869
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/96WNK on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/96WNK 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/96WNK 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/96WNK on line 3