3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = strtotime(date('d-m-Y')); print_r($time); print_r(date_default_timezone_get()); date_default_timezone_set('Australia/Melbourne'); #date_default_timezone_set('Pacific/Auckland'); date_default_timezone_set('Pacific/Fiji'); print_r(date_default_timezone_get()); $time = new DateTime(date('d-m-Y')); print_r($time->getTimestamp());
Output for 5.3.0 - 7.2.0
1430258400Europe/AmsterdamPacific/Fiji1430222400
Output for 5.2.0 - 5.2.17
1430258400Europe/AmsterdamPacific/Fiji Fatal error: Call to undefined method DateTime::getTimestamp() in /in/ioY0V on line 15
Process exited with code 255.
Output for 5.1.3 - 5.1.6
1430258400Europe/AmsterdamPacific/Fiji Fatal error: Class 'DateTime' not found in /in/ioY0V on line 14
Process exited with code 255.
Output for 5.1.0 - 5.1.2
Europe/AmsterdamPacific/Fiji Fatal error: Class 'DateTime' not found in /in/ioY0V on line 14
Process exited with code 255.
Output for 5.0.0 - 5.0.5
2043698400 Fatal error: Call to undefined function date_default_timezone_get() in /in/ioY0V on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
2043698400 Fatal error: Call to undefined function: date_default_timezone_get() in /in/ioY0V on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.4
2043698400 Fatal error: Call to undefined function: date_default_timezone_get() in /in/ioY0V on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
2043698400 Fatal error: Call to undefined function: date_default_timezone_get() in /in/ioY0V on line 6