summaryrefslogtreecommitdiff
path: root/ext/date/tests/gmstrftime_basic.phpt
blob: 26dc1af36c5cb30e6f20fe75794bf05e9f39a22b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Test gmstrftime() function : basic functionality
--FILE--
<?php
echo "*** Testing gmstrftime() : basic functionality ***\n";

// Initialise all required variables
$format = '%b %d %Y %H:%M:%S';
$timestamp = gmmktime(8, 8, 8, 8, 8, 2008);

// Calling gmstrftime() with all possible arguments
var_dump( gmstrftime($format, $timestamp) );

// Calling gmstrftime() with mandatory arguments
var_dump( gmstrftime($format) );

?>
--EXPECTF--
*** Testing gmstrftime() : basic functionality ***
string(20) "Aug 08 2008 08:08:08"
string(%d) "%s %d %d %d:%d:%d"