I was using a binary with the new timelib. Undo the datetime tests
[hiphop-php.git] / hphp / test / zend / bad / ext-date / gmmktime_variation5.php
blob90ecc4888fc486435d015502f0bcf2d921c293d0
1 <?php
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
5 * Alias to functions:
6 */
8 echo "*** Testing gmmktime() : usage variation ***\n";
10 // Initialise function arguments not being substituted (if any)
11 $hour = 8;
12 $min = 8;
13 $sec = 8;
14 $mon = 8;
15 $year = 2008;
17 //get an unset variable
18 $unset_var = 10;
19 unset ($unset_var);
21 // define some classes
22 class classWithToString
24 public function __toString() {
25 return "Class A object";
29 class classWithoutToString
33 // heredoc string
34 $heredoc = <<<EOT
35 hello world
36 EOT;
38 // add arrays
39 $index_array = array (1, 2, 3);
40 $assoc_array = array ('one' => 1, 'two' => 2);
42 //array of values to iterate over
43 $inputs = array(
45 // float data
46 'float 10.5' => 10.5,
47 'float -10.5' => -10.5,
48 'float .5' => .5,
50 // array data
51 'empty array' => array(),
52 'int indexed array' => $index_array,
53 'associative array' => $assoc_array,
54 'nested arrays' => array('foo', $index_array, $assoc_array),
56 // null data
57 'uppercase NULL' => NULL,
58 'lowercase null' => null,
60 // boolean data
61 'lowercase true' => true,
62 'lowercase false' =>false,
63 'uppercase TRUE' =>TRUE,
64 'uppercase FALSE' =>FALSE,
66 // empty data
67 'empty string DQ' => "",
68 'empty string SQ' => '',
70 // string data
71 'string DQ' => "string",
72 'string SQ' => 'string',
73 'mixed case string' => "sTrInG",
74 'heredoc' => $heredoc,
76 // object data
77 'instance of classWithToString' => new classWithToString(),
78 'instance of classWithoutToString' => new classWithoutToString(),
80 // undefined data
81 'undefined var' => @$undefined_var,
83 // unset data
84 'unset var' => @$unset_var,
87 // loop through each element of the array for day
89 foreach($inputs as $key =>$value) {
90 echo "\n--$key--\n";
91 var_dump( gmmktime($hour, $min, $sec, $mon, $value, $year) );
95 ===DONE===