1--TEST--
2Test DateTimeZone::getTransitions() function : error conditions
3--FILE--
4<?php
5/* Prototype  : array DateTimeZone::getTransitions  ([ int $timestamp_begin  [, int $timestamp_end  ]] )
6 * Description: Returns all transitions for the timezone
7 * Source code: ext/date/php_date.c
8 * Alias to functions: timezone_transitions_get()
9 */
10
11//Set the default time zone
12date_default_timezone_set("GMT");
13
14$tz = new DateTimeZone("Europe/London");
15
16echo "*** Testing DateTimeZone::getTransitions() : error conditions ***\n";
17
18echo "\n-- Testing DateTimeZone::getTransitions() function with more than expected no. of arguments --\n";
19$timestamp_begin = mktime(0, 0, 0, 1, 1, 1972);
20$timestamp_end = mktime(0, 0, 0, 1, 1, 1975);
21$extra_arg = 99;
22
23var_dump( $tz->getTransitions($timestamp_begin, $timestamp_end, $extra_arg) );
24
25?>
26===DONE===
27--EXPECTF--
28*** Testing DateTimeZone::getTransitions() : error conditions ***
29
30-- Testing DateTimeZone::getTransitions() function with more than expected no. of arguments --
31
32Warning: DateTimeZone::getTransitions() expects at most 2 parameters, 3 given in %s on line %d
33bool(false)
34===DONE===
35