mirror of
https://github.com/php/php-src.git
synced 2026-04-18 21:41:22 +02:00
Pass 1 instead of true and -1 instead of false. Part of https://wiki.php.net/rfc/deprecations_php_8_1.
37 lines
882 B
PHP
37 lines
882 B
PHP
--TEST--
|
|
IntlCalendar::isEquivalentTo() basic test
|
|
--EXTENSIONS--
|
|
intl
|
|
--FILE--
|
|
<?php
|
|
ini_set("intl.error_level", E_WARNING);
|
|
ini_set("intl.default_locale", "nl");
|
|
|
|
$intlcal1 = IntlCalendar::createInstance('Europe/Amsterdam');
|
|
$intlcal2 = IntlCalendar::createInstance('Europe/Lisbon');
|
|
$intlcal3 = IntlCalendar::createInstance('Europe/Amsterdam', "nl_NL@calendar=islamic");
|
|
$intlcal4 = IntlCalendar::createInstance('Europe/Amsterdam');
|
|
$intlcal4->roll(IntlCalendar::FIELD_MONTH, 1);
|
|
|
|
var_dump(
|
|
"1 - 1",
|
|
$intlcal1->isEquivalentTo($intlcal1),
|
|
"1 - 2",
|
|
$intlcal1->isEquivalentTo($intlcal2),
|
|
"1 - 3",
|
|
$intlcal1->isEquivalentTo($intlcal3),
|
|
"1 - 4",
|
|
$intlcal1->isEquivalentTo($intlcal4)
|
|
);
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(5) "1 - 1"
|
|
bool(true)
|
|
string(5) "1 - 2"
|
|
bool(false)
|
|
string(5) "1 - 3"
|
|
bool(false)
|
|
string(5) "1 - 4"
|
|
bool(true)
|