2
Test DateTime::getOffset() function : error conditions
6
/* Prototype : public int DateTime::getOffset ( void )
7
* Description: Returns the daylight saving time offset
8
* Source code: ext/date/php_date.c
9
* Alias to functions: date_offset_get
12
//Set the default time zone
13
date_default_timezone_set("Europe/London");
15
echo "*** Testing DateTime::getOffset() : error conditions ***\n";
17
echo "\n-- Testing DateTime::getOffset() function with more than expected no. of arguments --\n";
18
$datetime = new DateTime("2009-01-30 19:34:10");
21
var_dump( $datetime->getOffset($extra_arg) );
26
*** Testing DateTime::getOffset() : error conditions ***
28
-- Testing DateTime::getOffset() function with more than expected no. of arguments --
30
Warning: DateTime::getOffset() expects exactly 0 parameters, 1 given in %s on line %d