3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); $requested_timestamp=$date->getTimestamp(); var_dump($requested_timestamp);
Output for 5.6.28, 7.0.12 - 7.1.0
int(1380695398)
Output for 7.0.6
int(1462230484)
Output for 7.0.5
int(1459600111)
Output for 7.0.4
int(1457562546)
Output for 7.0.3
int(1458255228)
Output for 7.0.2
int(1458552929)
Output for 7.0.1
int(1458724624)
Output for 7.0.0
int(1458994610)
Output for hhvm-3.12.0
int(1457662931)
Output for hhvm-3.10.0
int(1459266475)
Output for 5.6.21
int(1462126369)
Output for 5.6.20
int(1460187807)
Output for 5.6.19
int(1457295106)
Output for 5.6.18
int(1457943895)
Output for 5.6.17
int(1458358136)
Output for 5.6.16
int(1459084012)
Output for 5.6.15
int(1459173647)
Output for 5.6.14
int(1459529027)
Output for 5.6.13
int(1460666050)
Output for 5.6.12
int(1461058746)
Output for 5.6.11
int(1461344200)
Output for 5.6.10
int(1461522928)
Output for 5.6.9
int(1461714067)
Output for 5.6.8
int(1461914114)
Output for 5.6.7
int(1464110292)
Output for 5.5.35
int(1463865482)
Output for 5.5.34
int(1460295334)
Output for 5.5.33
int(1457430210)
Output for 5.5.32
int(1458067318)
Output for 5.5.31
int(1458454972)
Output for 5.5.30
int(1459440334)
Output for 5.5.29
int(1460803087)
Output for 5.5.28
int(1461156595)
Output for 5.5.27
int(1461252483)
Output for 5.5.26
int(1461617434)
Output for 5.5.25
int(1461812240)
Output for 5.5.24
int(1462012481)
Output for 5.4.45
int(1447139377)
Output for 5.4.44
int(1447139378)
Output for 5.4.41 - 5.4.43
int(1447139380)
Output for 5.4.39 - 5.4.40
int(1447139382)
Output for 5.4.37 - 5.4.38
int(1447139383)
Output for 5.4.35 - 5.4.36
int(1447139384)
Output for 5.4.34
int(1447139385)
Output for 5.3.29, 5.4.30 - 5.4.32
int(1447139386)
Output for 5.4.27 - 5.4.29
int(1447139387)
Output for 5.4.23 - 5.4.26
int(1447139388)
Output for 5.3.28, 5.4.21 - 5.4.22
int(1447139389)
Output for 5.4.18 - 5.4.20
int(1447139390)
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.17
int(1447139391)
Output for 5.3.23 - 5.3.25, 5.4.13 - 5.4.15
int(1447139392)
Output for 5.3.20 - 5.3.22, 5.4.9 - 5.4.12
int(1447139393)
Output for 5.3.17 - 5.3.19, 5.4.6 - 5.4.8
int(1447139394)
Output for 5.3.14 - 5.3.16, 5.4.3 - 5.4.5
int(1447139395)
Output for 5.3.11 - 5.3.13, 5.4.0 - 5.4.2
int(1447139396)
Output for 5.3.5 - 5.3.10
int(1447139397)
Output for 5.3.2 - 5.3.4
int(1447139398)
Output for 5.3.0 - 5.3.1
int(1447139399)
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/a8jUj on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/a8jUj 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/a8jUj 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/a8jUj on line 2