3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function get_Datetime_Now() { $tz_object = new DateTimeZone('Brazil/East'); //date_default_timezone_set('Brazil/East'); $datetime = new DateTime(); $datetime->setTimezone($tz_object); return $datetime->format('Y\-m\-d\ h:i:s'); } echo $datetime;
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: datetime in /in/u0G4f on line 12
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: datetime in /in/u0G4f on line 12