3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date1 = new DateTime('now', new DateTimeZone('UTC')); $timestamp1 = $date1->getTimestamp(); $date2 = new DateTime('now', new DateTimeZone('Asia/Tokyo')); $timestamp2 = $date2->getTimestamp(); var_dump($timestamp1); var_dump($timestamp2);
based on NctIG
Output for 5.6.28, 7.0.20 - 7.2.0
int(1447103421) int(1447103421)
Output for 7.0.6
int(1463853199) int(1463853199)
Output for 7.0.5
int(1459659584) int(1459659584)
Output for 7.0.4
int(1457632016) int(1457632016)
Output for 7.0.3
int(1458327362) int(1458327362)
Output for 7.0.2
int(1458695041) int(1458695041)
Output for 7.0.1
int(1458794531) int(1458794531)
Output for 7.0.0
int(1459057092) int(1459057092)
Output for 5.6.21
int(1462218501) int(1462218501)
Output for 5.6.20
int(1460287710) int(1460287710)
Output for 5.6.19
int(1457402306) int(1457402306)
Output for 5.6.18
int(1458038538) int(1458038538)
Output for 5.6.17
int(1458426083) int(1458426083)
Output for 5.6.16
int(1459146326) int(1459146326)
Output for 5.6.15
int(1459235768) int(1459235768)
Output for 5.6.14
int(1459588027) int(1459588027)
Output for 5.6.13
int(1460749922) int(1460749922)
Output for 5.6.12
int(1461149689) int(1461149689)
Output for 5.6.11
int(1461516544) int(1461516544)
Output for 5.6.10
int(1461610640) int(1461610640)
Output for 5.6.9
int(1461804973) int(1461804973)
Output for 5.6.8
int(1462005706) int(1462005706)
Output for 5.5.35
int(1463994796) int(1463994796)
Output for 5.5.34
int(1460382327) int(1460382327)
Output for 5.5.33
int(1457498556) int(1457498556)
Output for 5.5.32
int(1458225467) int(1458225467)
Output for 5.5.31
int(1458523420) int(1458523420)
Output for 5.5.30
int(1459501796) int(1459501796)
Output for 5.5.29
int(1460887302) int(1460887302)
Output for 5.5.28
int(1461246245) int(1461246245)
Output for 5.5.27
int(1461338077) int(1461338077)
Output for 5.5.26
int(1461706733) int(1461706733)
Output for 5.5.25
int(1461906842) int(1461906842)
Output for 5.5.24
int(1464092472) int(1464092472)
Output for 5.4.44 - 5.4.45
int(1447103424) int(1447103424)
Output for 5.4.42 - 5.4.43
int(1447103425) int(1447103425)
Output for 5.4.39 - 5.4.41
int(1447103426) int(1447103426)
Output for 5.4.35 - 5.4.38
int(1447103427) int(1447103427)
Output for 5.3.29, 5.4.30 - 5.4.34
int(1447103428) int(1447103428)
Output for 5.4.24 - 5.4.29
int(1447103429) int(1447103429)
Output for 5.3.28, 5.4.19 - 5.4.23
int(1447103430) int(1447103430)
Output for 5.3.23 - 5.3.27, 5.4.13 - 5.4.18
int(1447103431) int(1447103431)
Output for 5.3.19 - 5.3.22, 5.4.9 - 5.4.12
int(1447103432) int(1447103432)