04 - 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.



Your result can be seen below.

Result of php executing





Full code of 04.php

  1. <?php
  2. $day1 = strtotime("2006-04-12 12:30:00");
  3. $day2 = strtotime("2006-04-22 12:30:00");
  4. $diffHours = round(($day2 - $day1) / 3600);
  5.     echo'[How much]: ', $diffHours;
  6.  
  7. ?>
  8.  
File Description
  • 04
  • PHP Code
  • 25 Jan-2024
  • 174 Bytes
You can Share it: