3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1413349200