Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
echo time().PHP_EOL;
echo date("Y-d-m H:i:s",time()).PHP_EOL;
echo date("H:i:s",time()).PHP_EOL;
//$cur_h=23;
$timenow = date('Gi');
$timestamp = strtotime($timenow);
echo 'time : ' . $timenow . '<br />'.PHP_EOL;
echo '' . $timestamp.PHP_EOL;
echo time().PHP_EOL.PHP_EOL;
for($cur_h = 0;$cur_h<24;$cur_h++){
echo '$cur_h:'.$cur_h;
if($cur_h >= 21)
{
echo ' :'.(32-$cur_h).PHP_EOL;
}
elseif($cur_h >= 0 && $cur_h<=8)
{
echo ' :'.(8-$cur_h).PHP_EOL;
}
}
//23-8=9