3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function hlavorativo($tstamp) { if(date('H',$tstamp)< 7 && date('H',$tstamp)>=00) { $tstamp = mktime(7, 0, 0, date("m",$tstamp), date("d",$tstamp), date("Y",$tstamp)); } elseif((date('H',$tstamp)>= 18 ) && (date('H',$tstamp)<= 23)) { $tstamp = mktime(7, 0, 0, date("m",$tstamp), date("d",$tstamp)+1, date("Y",$tstamp)); } return $tstamp; } echo hlavorativo('1413342204');
based on dkHce
Output for 4.3.0 - 7.2.0
1413349200