~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/date/tests/gmmktime_variation7.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Test gmmktime() function : usage variation - Checking with few optional arguments.
 
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
 
 
11
echo "*** Testing gmmktime() : usage variation ***\n";
 
12
 
 
13
// Initialise all required variables
 
14
$hour = 8;
 
15
$min = 8;
 
16
$sec = 8;
 
17
$mon = 8;
 
18
$day = 8;
 
19
 
 
20
echo "\n-- Testing gmmktime() function with one optional argument --\n";
 
21
var_dump( gmmktime($hour) );
 
22
 
 
23
echo "\n-- Testing gmmktime() function with two optional argument --\n";
 
24
var_dump( gmmktime($hour, $min) );
 
25
 
 
26
echo "\n-- Testing gmmktime() function with three optional argument --\n";
 
27
var_dump( gmmktime($hour, $min, $sec) );
 
28
 
 
29
echo "\n-- Testing gmmktime() function with four optional argument --\n";
 
30
var_dump( gmmktime($hour, $min, $sec, $mon) );
 
31
 
 
32
echo "\n-- Testing gmmktime() function with five optional argument --\n";
 
33
var_dump( gmmktime($hour, $min, $sec, $mon, $day) );
 
34
 
 
35
?>
 
36
===DONE===
 
37
--EXPECTF--
 
38
*** Testing gmmktime() : usage variation ***
 
39
 
 
40
-- Testing gmmktime() function with one optional argument --
 
41
int(%d)
 
42
 
 
43
-- Testing gmmktime() function with two optional argument --
 
44
int(%d)
 
45
 
 
46
-- Testing gmmktime() function with three optional argument --
 
47
int(%d)
 
48
 
 
49
-- Testing gmmktime() function with four optional argument --
 
50
int(%d)
 
51
 
 
52
-- Testing gmmktime() function with five optional argument --
 
53
int(%d)
 
54
===DONE===