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 - 7.2.12
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.5.0 - 5.6.38, hhvm-3.10.1, hhvm-3.12.14 - 3.21.3, 7.0.0 - 7.1.24
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103611) int(1447103611)
Output for hhvm-3.22.0
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line -1 int(1447103611) int(1447103611)
Output for hhvm-3.11.1
Notice: Use of undefined constant UTC - assumed 'UTC' in /in/COQT9 on line 4 int(1447103612) int(1447103612)
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)