2 /* Prototype : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
3 * Description: Get UNIX timestamp for a GMT date
4 * Source code: ext/date/php_date.c
8 echo "*** Testing gmmktime() : usage variation ***\n";
10 // Initialise function arguments not being substituted (if any)
17 //get an unset variable
21 // define some classes
22 class classWithToString
24 public function __toString() {
25 return "Class A object";
29 class classWithoutToString
39 $index_array = array (1, 2, 3);
40 $assoc_array = array ('one' => 1, 'two' => 2);
42 //array of values to iterate over
47 'float -10.5' => -10.5,
51 'empty array' => array(),
52 'int indexed array' => $index_array,
53 'associative array' => $assoc_array,
54 'nested arrays' => array('foo', $index_array, $assoc_array),
57 'uppercase NULL' => NULL,
58 'lowercase null' => null,
61 'lowercase true' => true,
62 'lowercase false' =>false,
63 'uppercase TRUE' =>TRUE,
64 'uppercase FALSE' =>FALSE,
67 'empty string DQ' => "",
68 'empty string SQ' => '',
71 'string DQ' => "string",
72 'string SQ' => 'string',
73 'mixed case string' => "sTrInG",
74 'heredoc' => $heredoc,
77 'instance of classWithToString' => new classWithToString(),
78 'instance of classWithoutToString' => new classWithoutToString(),
81 'undefined var' => @$undefined_var,
84 'unset var' => @$unset_var,
87 // loop through each element of the array for min
89 foreach($inputs as $key =>$value) {
91 var_dump( gmmktime($hour, $value, $sec, $mon, $day, $year) );