1--TEST--
2Test date_sunrise() function : usage variation -  Checking sunrise for consecutive days in specific timezone
3--INI--
4error_reporting=E_ALL&~E_DEPRECATED
5--FILE--
6<?php
7echo "*** Testing date_sunrise() : usage variation ***\n";
8
9//Timezones with required data for date_sunrise
10$inputs = array (
11        //Timezone with Latitude, Longitude and GMT offset
12        "Pacific/Samoa" => array ("Latitude" => -14.24, "Longitude" => -170.72, "GMT" => -11),
13        "US/Alaska" => array ("Latitude" => 61, "Longitude" => -150 , "GMT" => -9),
14        "America/Chicago" => array ("Latitude" => 41.85, "Longitude" => -87.65 , "GMT" => -5),
15        "America/Montevideo" => array ("Latitude" => -34.88, "Longitude" => -56.18 , "GMT" => -3),
16        "Africa/Casablanca" => array ("Latitude" => 33.65, "Longitude" => -7.58, "GMT" => 0),
17        "Europe/Moscow" => array ("Latitude" => 55.75, "Longitude" => 37.58, "GMT" => 4),
18        "Asia/Hong_Kong" => array ("Latitude" => 22.28, "Longitude" => 114.15 , "GMT" => 8),
19        "Australia/Brisbane" => array ("Latitude" => -27.46, "Longitude" => 153.2 , "GMT" => 10),
20        "Pacific/Wallis" => array ("Latitude" => -13.3, "Longitude" => -176.16, "GMT" => 12),
21);
22
23foreach($inputs as $timezone => $value) {
24     date_default_timezone_set($timezone);
25     $time = mktime(8, 8, 8, 8, 11, 2008);
26     var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $value["Latitude"], $value["Longitude"], 90, $value["GMT"] ));
27     $time = mktime(8, 8, 8, 8, 12, 2008);
28     var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $value["Latitude"], $value["Longitude"], 90, $value["GMT"]) );
29}
30
31?>
32--EXPECT--
33*** Testing date_sunrise() : usage variation ***
34string(5) "06:42"
35string(5) "06:41"
36string(5) "05:07"
37string(5) "05:09"
38string(5) "05:58"
39string(5) "05:59"
40string(5) "07:31"
41string(5) "07:30"
42string(5) "05:52"
43string(5) "05:53"
44string(5) "05:59"
45string(5) "06:01"
46string(5) "06:01"
47string(5) "06:02"
48string(5) "06:23"
49string(5) "06:22"
50string(5) "06:03"
51string(5) "06:02"
52