1--TEST--
2IntlTimeZone::hasSameRules(): basic test
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6    die('skip intl extension not enabled');
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10
11$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
12$prt = IntlTimeZone::createTimeZone('Portugal');
13$azo = IntlTimeZone::createTimeZone('Atlantic/Azores');
14
15echo "Europe/Lisbon has same rules as itself:\n";
16var_dump($lsb->hasSameRules($lsb));
17
18echo "\nEurope/Lisbon has same rules as Portugal:\n";
19var_dump($lsb->hasSameRules($prt));
20
21echo "\nEurope/Lisbon has same rules as Atlantic/Azores:\n";
22var_dump(intltz_has_same_rules($lsb, $azo));
23
24?>
25--EXPECT--
26Europe/Lisbon has same rules as itself:
27bool(true)
28
29Europe/Lisbon has same rules as Portugal:
30bool(true)
31
32Europe/Lisbon has same rules as Atlantic/Azores:
33bool(false)
33