3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime("now"); $hourString = $date->format('H:i'); if ( strtotime($hourString) > strtotime('12:00:00') && strtotime($hourString) < strtotime('23:59:59') && strtotime($hourString) > strtotime('00:00:00') && strtotime($hourString) < strtotime('07:00:00') ) { echo($hourString); }

preferences:
36.34 ms | 402 KiB | 5 Q