xref: /PHP-5.3/ext/date/tests/timezones-list.phpt (revision 216d0cb0)
1--TEST--
2timezone_identifiers_list()
3--FILE--
4<?php
5$a = timezone_identifiers_list();
6$b = timezone_identifiers_list( DateTimezone::AMERICA );
7$c = timezone_identifiers_list( DateTimezone::ALL_WITH_BC );
8$d = timezone_identifiers_list( DateTimezone::EUROPE | DateTimezone::UTC );
9
10echo in_array( "Europe/Oslo", $a ) ? "found" : "notfound", "\n";
11echo in_array( "Europe/Oslo", $b ) ? "found" : "notfound", "\n";
12echo in_array( "Europe/Oslo", $c ) ? "found" : "notfound", "\n";
13echo in_array( "Europe/Oslo", $d ) ? "found" : "notfound", "\n\n";
14
15echo in_array( "America/New_York", $a ) ? "found" : "notfound", "\n";
16echo in_array( "America/New_York", $b ) ? "found" : "notfound", "\n";
17echo in_array( "America/New_York", $c ) ? "found" : "notfound", "\n";
18echo in_array( "America/New_York", $d ) ? "found" : "notfound", "\n\n";
19
20echo in_array( "UTC", $a ) ? "found" : "notfound", "\n";
21echo in_array( "UTC", $b ) ? "found" : "notfound", "\n";
22echo in_array( "UTC", $c ) ? "found" : "notfound", "\n";
23echo in_array( "UTC", $d ) ? "found" : "notfound", "\n\n";
24
25echo in_array( "US/Eastern", $a ) ? "found" : "notfound", "\n";
26echo in_array( "US/Eastern", $b ) ? "found" : "notfound", "\n";
27echo in_array( "US/Eastern", $c ) ? "found" : "notfound", "\n";
28echo in_array( "US/Eastern", $d ) ? "found" : "notfound", "\n\n";
29?>
30--EXPECT--
31found
32notfound
33found
34found
35
36found
37found
38found
39notfound
40
41found
42notfound
43found
44found
45
46notfound
47notfound
48found
49notfound
50