3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //following GMT value or offset get from api $offsetHours = '-5 hours'; // This time i get from api $currentValue = '1401705628'; $actualTimeStamp = strtotime($offsetHours,$currentValue); echo $actualTimeStamp.PHP_EOL; echo date('h:i A',$actualTimeStamp);
Output for 4.3.10 - 4.4.9, 5.0.3 - 7.1.0
1401687628 07:40 AM
Output for 5.0.2
1401642000 07:00 PM
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/lXA2f on line 8 1401642000PHP_EOL07:00 PM
Output for 4.3.0 - 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/lXA2f on line 8 1401687628PHP_EOL07:40 AM