3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime('now', new DateTimeZone('Europe/Madrid')); var_dump($dt->getTimestamp()); $dt->setTimezone(new DateTimeZone('America/Bogota')); var_dump($dt->getTimestamp());
Output for 7.0.14 - 7.3.0rc4
int(1404829798) int(1404829798)
Output for 7.0.6
int(1462262708) int(1462262708)
Output for 7.0.5
int(1459630403) int(1459630403)
Output for 7.0.4
int(1457598484) int(1457598484)
Output for 7.0.3
int(1458291996) int(1458291996)
Output for 7.0.2
int(1458658787) int(1458658787)
Output for 7.0.1
int(1458762172) int(1458762172)
Output for 7.0.0
int(1459026922) int(1459026922)
Output for 5.6.21
int(1462159495) int(1462159495)
Output for 5.6.20
int(1460231454) int(1460231454)
Output for 5.6.19
int(1457368546) int(1457368546)
Output for 5.6.18
int(1458002367) int(1458002367)
Output for 5.6.17
int(1458393658) int(1458393658)
Output for 5.6.16
int(1459116068) int(1459116068)
Output for 5.6.15
int(1459206433) int(1459206433)
Output for 5.6.14
int(1459560419) int(1459560419)
Output for 5.6.13
int(1460697658) int(1460697658)
Output for 5.6.12
int(1461092857) int(1461092857)
Output for 5.6.11
int(1461377441) int(1461377441)
Output for 5.6.10
int(1461556465) int(1461556465)
Output for 5.6.9
int(1461747138) int(1461747138)
Output for 5.6.8
int(1461949169) int(1461949169)
Output for 5.5.35
int(1463901151) int(1463901151)
Output for 5.5.34
int(1460326313) int(1460326313)
Output for 5.5.33
int(1457465564) int(1457465564)
Output for 5.5.32
int(1458180873) int(1458180873)
Output for 5.5.31
int(1458490001) int(1458490001)
Output for 5.5.30
int(1459472630) int(1459472630)
Output for 5.5.29
int(1460834836) int(1460834836)
Output for 5.5.28
int(1461190443) int(1461190443)
Output for 5.5.27
int(1461285681) int(1461285681)
Output for 5.5.26
int(1461651668) int(1461651668)
Output for 5.5.25
int(1461847178) int(1461847178)
Output for 5.5.24
int(1464033641) int(1464033641)
Output for 5.4.45
int(1442788434) int(1442788434)
Output for 5.4.44
int(1442788403) int(1442788403)
Output for 5.4.43
int(1442788373) int(1442788373)
Output for 5.4.42
int(1442788364) int(1442788364)
Output for 5.4.41
int(1442788354) int(1442788354)
Output for 5.4.40
int(1442788345) int(1442788345)
Output for 5.4.39
int(1442788338) int(1442788338)
Output for 5.4.38
int(1425486618) int(1425486618)
Output for 5.4.36 - 5.4.37
int(1425486608) int(1425486608)
Output for 5.4.34 - 5.4.35
int(1425486607) int(1425486607)
Output for 5.4.32
int(1410605833) int(1410605833)
Output for 5.4.31
int(1410605832) int(1410605832)
Output for 5.4.27 - 5.4.30
int(1404829803) int(1404829803)
Output for 5.4.11 - 5.4.26
int(1404829804) int(1404829804)
Output for 5.3.24 - 5.3.28, 5.4.0 - 5.4.10
int(1404829805) int(1404829805)
Output for 5.3.29
int(1410605831) int(1410605831)
Output for 5.3.13 - 5.3.23
int(1404829806) int(1404829806)
Output for 5.3.0 - 5.3.12
int(1404829807) int(1404829807)
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/7X6QX on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/7X6QX 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/7X6QX 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/7X6QX on line 3