3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $utc = new DateTimeZone('UTC'); $amla = new DateTimeZone('America/New_York'); $two_past_midnight = new DateTime('2016-03-12 19:00', $utc); if ( date('T',$two_past_midnight) == 'EST' ){ echo 'Easter Standard Time'; } else{ echo "Estern Daylight Time"; } $two_past_midnight->setTimeZone($amla); echo $two_past_midnight->format('T'); ?>
based on PkBcr
Output for 7.0.0 - 7.2.0
Warning: date() expects parameter 2 to be integer, object given in /in/X0a43 on line 6 Estern Daylight TimeEST
Output for 5.5.0 - 5.6.28
Warning: date() expects parameter 2 to be long, object given in /in/X0a43 on line 6 Estern Daylight TimeEST