3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datetime = new Datetime('2001-07-18 00:00:00'); //le jour de mes 20 ans :) quoique: https://www.youtube.com/watch?v=S8HHX0941Ac //WEST $datetime->setDateTimeZone(new DateTimeZone('Europe/Paris')); echo $datetime->format('c'); echo "\n"; //WET $datetime->setDateTimeZone(new DateTimeZone('Africa/Algiers')); echo $datetime->format('c');
based on Jhc3s
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined method DateTime::setDateTimeZone() in /in/2XsMB:7 Stack trace: #0 {main} thrown in /in/2XsMB on line 7
Process exited with code 255.
Output for 5.5.0 - 5.6.21
Fatal error: Call to undefined method DateTime::setDateTimeZone() in /in/2XsMB on line 7
Process exited with code 255.