1--TEST--
2Test DateTime::getOffset() function : error conditions
3--FILE--
4<?php
5
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
10 */
11
12 //Set the default time zone
13date_default_timezone_set("Europe/London");
14
15echo "*** Testing DateTime::getOffset() : error conditions ***\n";
16
17echo "\n-- Testing DateTime::getOffset() function with more than expected no. of arguments --\n";
18$datetime = new DateTime("2009-01-30 19:34:10");
19$extra_arg = 30;
20
21var_dump( $datetime->getOffset($extra_arg) );
22
23?>
24===DONE===
25--EXPECTF--
26*** Testing DateTime::getOffset() : error conditions ***
27
28-- Testing DateTime::getOffset() function with more than expected no. of arguments --
29
30Warning: DateTime::getOffset() expects exactly 0 parameters, 1 given in %s on line %d
31bool(false)
32===DONE===
33
34