summaryrefslogtreecommitdiff
path: root/ext/date/tests/gmdate_variation5.phpt
blob: 0127fc5876a6af033924ea0d07e09d9898dab4f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
Test gmdate() function : usage variation - Passing Week representation to format.
--FILE--
<?php
/* Prototype  : string gmdate(string format [, long timestamp])
 * Description: Format a GMT date/time
 * Source code: ext/date/php_date.c
 * Alias to functions:
 */

echo "*** Testing gmdate() : usage variation ***\n";

// Initialise all required variables
date_default_timezone_set('UTC');
$timestamp = mktime(8, 8, 8, 8, 8, 2008);

echo "\n-- Testing gmdate() function with ISO-8601 week number of year format --\n";
var_dump( gmdate('W') );
var_dump( gmdate('W', $timestamp) );

?>
===DONE===
--EXPECTF--
*** Testing gmdate() : usage variation ***

-- Testing gmdate() function with ISO-8601 week number of year format --
string(%d) "%d"
string(2) "32"
===DONE===