3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); var_dump($date->getTimestamp());
based on us7ec
Output for 5.6.28, 7.0.14 - 7.1.0
int(1408105438)
Output for 7.0.6
int(1462288746)
Output for 7.0.5
int(1459655281)
Output for 7.0.4
int(1457627362)
Output for 7.0.3
int(1458321357)
Output for 7.0.2
int(1458689532)
Output for 7.0.1
int(1458790100)
Output for 7.0.0
int(1459052697)
Output for hhvm-3.12.0
int(1457836903)
Output for hhvm-3.10.0
int(1459374285)
Output for 5.6.21
int(1462184961)
Output for 5.6.20
int(1460256388)
Output for 5.6.19
int(1457397453)
Output for 5.6.18
int(1458032957)
Output for 5.6.17
int(1458421325)
Output for 5.6.16
int(1459141948)
Output for 5.6.15
int(1459231414)
Output for 5.6.14
int(1459583896)
Output for 5.6.13
int(1460722684)
Output for 5.6.12
int(1461120323)
Output for 5.6.11
int(1461488283)
Output for 5.6.10
int(1461582681)
Output for 5.6.9
int(1461774025)
Output for 5.6.8
int(1461978780)
Output for 5.5.35
int(1463934855)
Output for 5.5.34
int(1460350797)
Output for 5.5.33
int(1457493378)
Output for 5.5.32
int(1458219227)
Output for 5.5.31
int(1458518288)
Output for 5.5.30
int(1459497389)
Output for 5.5.29
int(1460860972)
Output for 5.5.28
int(1461218211)
Output for 5.5.27
int(1461311343)
Output for 5.5.26
int(1461678769)
Output for 5.5.25
int(1461876243)
Output for 5.5.24
int(1464060231)
Output for 5.4.45
int(1441820676)
Output for 5.4.44
int(1439144400)
Output for 5.4.43
int(1439144395)
Output for 5.4.42
int(1439144394)
Output for 5.4.41
int(1439144392)
Output for 5.4.40
int(1431550562)
Output for 5.4.39
int(1431550561)
Output for 5.4.38
int(1424620181)
Output for 5.4.37
int(1422980378)
Output for 5.4.36
int(1422980377)
Output for 5.4.35
int(1415961872)
Output for 5.4.34
int(1415885488)
Output for 5.4.32
int(1409216744)
Output for 5.4.16 - 5.4.31
int(1408105443)
Output for 5.3.24 - 5.3.28, 5.4.0 - 5.4.15
int(1408105444)
Output for 5.3.29
int(1409216743)
Output for 5.3.3 - 5.3.23
int(1408105445)
Output for 5.3.0 - 5.3.2
int(1408105446)
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Mogaf on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/Mogaf 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/Mogaf 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/Mogaf on line 2