xref: /PHP-8.2/ext/date/tests/mktime_basic1.phpt (revision b5c7a83d)
1--TEST--
2Test mktime() function : basic functionality
3--FILE--
4<?php
5//Set the default time zone
6date_default_timezone_set("Europe/London");
7
8echo "*** Testing DateTime::modify() : basic functionality ***\n";
9
10$hour = 10;
11$minute = 30;
12$sec = 45;
13$month = 7;
14$day = 2;
15$year = 1963;
16
17var_dump( mktime($hour) );
18var_dump( mktime($hour, $minute) );
19var_dump( mktime($hour, $minute, $sec) );
20var_dump( mktime($hour, $minute, $sec, $month) );
21var_dump( mktime($hour, $minute, $sec, $month, $day) );
22var_dump( mktime($hour, $minute, $sec, $month, $day, $year) );
23
24?>
25--EXPECTF--
26*** Testing DateTime::modify() : basic functionality ***
27int(%i)
28int(%i)
29int(%i)
30int(%i)
31int(%i)
32int(%i)
33