Мое1 - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of Мое1.php
- <?php
- $start = "10:05";
- $end = "03:00";
- $time = strtotime(date('h:i'));
- if (strtotime($start) > strtotime($end)) {
- $timestart = strtotime($start);
- if ($time < $timestart) {
- $timestart = strtotime('-1 days');
- $timeend = strtotime($end);
- } else {
- $timeend = strtotime("24:00") + strtotime($end) - strtotime("00:00");
- }
- } else {
- $timestart = strtotime($start);
- $timeend = strtotime($end);
- }
- echo $timestart, "\n";
- echo $timeend, "\n";
- echo $time, "\n";
- echo date('h:i'), "\n";
- if ($time > $timestart && $time < $timeend) {
- echo "работает!";
- } else {
- echo "закрыто!";
- }
File Description
- Мое1
- PHP Code
- 21 Apr-2022
- 640 Bytes
You can Share it:
Latest PHP Pastes