Run ❯
Get your
own PHP
server
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <?php $t = date("H"); echo "<p>The hour (of the server) is " . $t; echo ", and will give the following message:</p>"; if ($t < "10") { echo "Have a good morning!"; } elseif ($t < "20") { echo "Have a good day!"; } else { echo "Have a good night!"; } ?> </body> </html>
The hour (of the server) is 10, and will give the following message:
Have a good day!