3v4l.org

run code in 300+ PHP versions simultaneously
<?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 strtotime($offsetHours)."==="; echo $actualTimeStamp."==="; echo date('d-M-Y h:i A',$actualTimeStamp); $date = new DateTime('2000-01-01'); $date->add(new DateInterval('P10D')); echo $date->format('Y-m-d') . "\n";

preferences:
30.44 ms | 402 KiB | 5 Q