mkdate and getdate - 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 mkdate and getdate.php
- <?php
- $expires = mktime(13, 30, 0, 3, 15, 2018);
- echo($expires . "<br>");
- $parts = getdate($expires);
- $year = $parts['year'];
- echo($year . "<br>");
- $mon = $parts['mon'];
- echo($mon . "<br>");
- $month = $parts['month'];
- echo($month . "<br>");
- $mday = $parts['mday'];
- echo($mday . "<br>");
- $weekday = $parts['weekday'];
- echo($weekday . "<br>");
- $wday = $parts['wday'];
- echo($wday . "<br>");
- $hours = $parts['hours'];
- echo($hours . "<br>");
- $minutes = $parts['minutes'];
- echo($minutes . "<br>");
- $seconds = $parts['seconds'];
- echo($seconds . "<br>");