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 cgHbG
Output for 7.2.0
Warning: Use of undefined constant UTC - assumed 'UTC' (this will throw an Error in a future version of PHP) in /in/COQT9 on line 4 int(1447103611) int(1447103611)
Output for 5.6.28, 7.0.20 - 7.1.10
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103611) int(1447103611)
Output for 7.0.6
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1462293290) int(1462293290)
Output for 7.0.5
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1459659585) int(1459659585)
Output for 7.0.4
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1457632017) int(1457632017)
Output for 7.0.3
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1458327363) int(1458327363)
Output for 7.0.2
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1458695043) int(1458695043)
Output for 7.0.1
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1458794532) int(1458794532)
Output for 7.0.0
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1459057093) int(1459057093)
Output for 5.6.21
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1462189443) int(1462189443)
Output for 5.6.20
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1460260737) int(1460260737)
Output for 5.6.19
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1457402307) int(1457402307)
Output for 5.6.18
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1458038539) int(1458038539)
Output for 5.6.17
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1458426085) int(1458426085)
Output for 5.6.16
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1459146327) int(1459146327)
Output for 5.6.15
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1459235769) int(1459235769)
Output for 5.6.14
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1459588028) int(1459588028)
Output for 5.6.13
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1460727106) int(1460727106)
Output for 5.6.12
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461124864) int(1461124864)
Output for 5.6.11
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461493439) int(1461493439)
Output for 5.6.10
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461587192) int(1461587192)
Output for 5.6.9
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461778580) int(1461778580)
Output for 5.6.8
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461983308) int(1461983308)
Output for 5.5.35
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1463944109) int(1463944109)
Output for 5.5.34
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1460355058) int(1460355058)
Output for 5.5.33
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1457498557) int(1457498557)
Output for 5.5.32
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1458225468) int(1458225468)
Output for 5.5.31
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1458523421) int(1458523421)
Output for 5.5.30
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1459501797) int(1459501797)
Output for 5.5.29
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1460865300) int(1460865300)
Output for 5.5.28
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461222903) int(1461222903)
Output for 5.5.27
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461315672) int(1461315672)
Output for 5.5.26
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461683365) int(1461683365)
Output for 5.5.25
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1461881087) int(1461881087)
Output for 5.5.24
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1464099742) int(1464099742)
Output for 5.4.45
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103613) int(1447103613)
Output for 5.4.44
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103614) int(1447103614)
Output for 5.4.41 - 5.4.43
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103615) int(1447103615)
Output for 5.4.40
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103616) int(1447103616)
Output for 5.4.38 - 5.4.39
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103617) int(1447103617)
Output for 5.4.34 - 5.4.37
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103618) int(1447103618)
Output for 5.3.29, 5.4.31 - 5.4.32
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103619) int(1447103619)
Output for 5.4.26 - 5.4.30
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103620) int(1447103620)
Output for 5.3.28, 5.4.22 - 5.4.25
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103621) int(1447103621)
Output for 5.4.18 - 5.4.21
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103622) int(1447103622)
Output for 5.3.24 - 5.3.27, 5.4.14 - 5.4.17
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103623) int(1447103623)
Output for 5.3.20 - 5.3.23, 5.4.10 - 5.4.13
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103624) int(1447103624)
Output for 5.3.19, 5.4.9
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103625) int(1447103625)