xref: /PHP-5.6/ext/date/tests/gmmktime_basic.phpt (revision 223c2d00)
1--TEST--
2Test gmmktime() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
6 * Description: Get UNIX timestamp for a GMT date
7 * Source code: ext/date/php_date.c
8 * Alias to functions:
9 */
10
11echo "*** Testing gmmktime() : basic functionality ***\n";
12
13// Initialise all required variables
14$hour = 8;
15$min = 8;
16$sec = 8;
17$mon = 8;
18$day = 8;
19$year = 2008;
20
21// Calling gmmktime() with all possible arguments
22var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) );
23
24// Calling gmmktime() with mandatory arguments
25var_dump( gmmktime() );
26
27?>
28===DONE===
29--EXPECTF--
30*** Testing gmmktime() : basic functionality ***
31int(1218182888)
32
33Strict Standards: gmmktime(): You should be using the time() function instead in %s on line %d
34int(%d)
35===DONE===
36