1--TEST--
2Test timezone_name_from_abbr() function : error conditions
3--FILE--
4<?php
5/* Prototype  : string timezone_name_from_abbr  ( string $abbr  [, int $gmtOffset= -1  [, int $isdst= -1  ]] )
6 * Description: Returns the timezone name from abbrevation
7 * Source code: ext/date/php_date.c
8 * Alias to functions:
9 */
10
11error_reporting(E_ALL | E_STRICT);
12
13//Set the default time zone
14date_default_timezone_set("Europe/London");
15
16echo "*** Testing timezone_name_from_abbr() : error conditions ***\n";
17
18echo "\n-- Testing timezone_name_from_abbr() function with Zero arguments --\n";
19var_dump( timezone_name_from_abbr() );
20
21echo "\n-- Testing timezone_name_from_abbr() function with more than expected no. of arguments --\n";
22$abbr = 10;
23$gmtOffset = 30;
24$isdst = 45;
25$extra_arg = 10;
26var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst, $extra_arg) );
27
28?>
29===DONE===
30--EXPECTF--
31*** Testing timezone_name_from_abbr() : error conditions ***
32
33-- Testing timezone_name_from_abbr() function with Zero arguments --
34
35Warning: timezone_name_from_abbr() expects at least 1 parameter, 0 given in %s on line %d
36bool(false)
37
38-- Testing timezone_name_from_abbr() function with more than expected no. of arguments --
39
40Warning: timezone_name_from_abbr() expects at most 3 parameters, 4 given in %s on line %d
41bool(false)
42===DONE===