Compare commits

..
Author SHA1 Message Date
Stanislav Malyshev 4c29cabfe0 5.4.27 2014-04-01 22:43:49 -07:00
Remi Collet 67290f51e5 NEWS 2014-03-27 15:24:12 -07:00
Remi Collet 275009cc7c Fixed bug #66946 extensive backtracking in awk rule regular expression
CVE-2013-7345

Applied upstream patch:
https://github.com/file/file/commit/ef2329cf71acb59204dd981e2c6cce6c81fe467c

Add the magicdata.patch to track patches applied to upstream data file.
2014-03-27 15:20:47 -07:00
Remi Collet 9c7690a39e Fixed bug #66946 extensive backtracking in awk rule regular expression
CVE-2013-7345

Applied upstream patch:
https://github.com/file/file/commit/ef2329cf71acb59204dd981e2c6cce6c81fe467c

Add the magicdata.patch to track patches applied to upstream data file.
2014-03-27 15:20:37 -07:00
Stanislav Malyshev 179c7c59ea 5.4.27 rc1 2014-03-18 23:16:57 -07:00
Stanislav Malyshev 8c6be9f40c prep for 5.4.27 rc1 2014-03-18 23:14:18 -07:00
102 changed files with 525 additions and 4633 deletions

No files matched your search

+3 -60
View File
@@ -1,62 +1,5 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 Apr 2014, PHP 5.4.28 RC1
- Core:
. Fixed bug #61019 (Out of memory on command stream_get_contents). (Mike)
. Fixed bug #64330 (stream_socket_server() creates wrong Abstract Namespace
UNIX sockets). (Mike)
. Fixed bug #64604 (parse_url is inconsistent with specified port).
(Ingo Walz)
. Fixed bug #66171 (Symlinks and session handler allow open_basedir bypass).
(Jann Horn, Stas)
. Fixed bug #66182 (exit in stream filter produces segfault). (Mike)
. Fixed bug #66736 (fpassthru broken). (Mike)
. Fixed bug #67024 (getimagesize should recognize BMP files with negative
height). (Gabor Buella)
- cURL:
. Fixed bug #66562 (curl_exec returns differently than curl_multi_getcontent).
(Freek Lijten)
- Date:
. Fixed bug #66721 (__wakeup of DateTime segfaults when invalid object data is
supplied). (Boro Sitnikovski)
- Embed:
. Fixed bug #65715 (php5embed.lib isn't provided anymore). (Anatol)
- Fileinfo:
. Fixed bug #66987 (Memory corruption in fileinfo ext / bigendian).
(Remi)
- FPM:
. Fixed bug #66482 (unknown entry 'priority' in php-fpm.conf).
- JSON:
. Fixed bug #66021 (Blank line inside empty array/object when
JSON_PRETTY_PRINT is set). (Kevin Israel)
- LDAP:
. Fixed issue with null bytes in LDAP bindings. (Matthew Daley)
- OpenSSL:
. Fix bug #66942 (memory leak in openssl_seal()). (Chuan Ma)
. Fix bug #66952 (memory leak in openssl_open()). (Chuan Ma)
- SimpleXML:
. Fixed bug #66084 (simplexml_load_string() mangles empty node name)
(Anatol)
- XSL:
. Fixed bug #53965 (<xsl:include> cannot find files with relative paths
when loaded with "file://"). (Anatol)
- Apache2 Handler SAPI:
. Fixed Apache log issue caused by APR's lack of support for %zu
(APR issue https://issues.apache.org/bugzilla/show_bug.cgi?id=56120).
(Jeff Trawick)
03 Apr 2014, PHP 5.4.27
- Core:
@@ -68,17 +11,17 @@ PHP NEWS
- FPM:
. Added clear_env configuration directive to disable clearenv() call.
(Github PR# 598, Paul Annesley)
(Github PR# 598, Paul Annesley)
- GMP
. Fixed bug #66872 (invalid argument crashes gmp_testbit) (Pierre)
. fixed bug#66872 (invalid argument crashes gmp_testbit) (Pierre)
- Mail:
. Fixed bug #66535 (Don't add newline after X-PHP-Originating-Script) (Tjerk)
- MySQLi:
. Fixed bug #66762 (Segfault in mysqli_stmt::bind_result() when link closed)
(Remi)
(Remi)
- Openssl:
. Fixed bug #66833 (Default disgest algo is still MD5, switch to SHA1). (Remi)
+2 -2
View File
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=28
PHP_EXTRA_VERSION="RC1"
PHP_RELEASE_VERSION=27
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
-2
View File
@@ -253,8 +253,6 @@ PHP_FUNCTION(curl_multi_getcontent)
smart_str_0(&ch->handlers->write->buf);
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
}
RETURN_EMPTY_STRING();
}
/* }}} */
+386 -405
View File
@@ -1,4 +1,4 @@
const timelib_tzdb_index_entry timezonedb_idx_builtin[580] = {
const timelib_tzdb_index_entry timezonedb_idx_builtin[579] = {
{ "Africa/Abidjan" , 0x000000 },
{ "Africa/Accra" , 0x000055 },
{ "Africa/Addis_Ababa" , 0x0000FD },
@@ -227,361 +227,360 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[580] = {
{ "Antarctica/Rothera" , 0x01848C },
{ "Antarctica/South_Pole" , 0x018502 },
{ "Antarctica/Syowa" , 0x018880 },
{ "Antarctica/Troll" , 0x0188EE },
{ "Antarctica/Vostok" , 0x018AC0 },
{ "Arctic/Longyearbyen" , 0x018B31 },
{ "Asia/Aden" , 0x018E63 },
{ "Asia/Almaty" , 0x018EB8 },
{ "Asia/Amman" , 0x019037 },
{ "Asia/Anadyr" , 0x0192ED },
{ "Asia/Aqtau" , 0x0194D2 },
{ "Asia/Aqtobe" , 0x0196D1 },
{ "Asia/Ashgabat" , 0x019889 },
{ "Asia/Ashkhabad" , 0x0199A6 },
{ "Asia/Baghdad" , 0x019AC3 },
{ "Asia/Bahrain" , 0x019C38 },
{ "Asia/Baku" , 0x019C9E },
{ "Asia/Bangkok" , 0x019F86 },
{ "Asia/Beirut" , 0x019FDB },
{ "Asia/Bishkek" , 0x01A2E8 },
{ "Asia/Brunei" , 0x01A494 },
{ "Asia/Calcutta" , 0x01A4F6 },
{ "Asia/Choibalsan" , 0x01A56F },
{ "Asia/Chongqing" , 0x01A6E8 },
{ "Asia/Chungking" , 0x01A7D7 },
{ "Asia/Colombo" , 0x01A886 },
{ "Asia/Dacca" , 0x01A922 },
{ "Asia/Damascus" , 0x01A9C8 },
{ "Asia/Dhaka" , 0x01AD18 },
{ "Asia/Dili" , 0x01ADBE },
{ "Asia/Dubai" , 0x01AE48 },
{ "Asia/Dushanbe" , 0x01AE9D },
{ "Asia/Gaza" , 0x01AFA0 },
{ "Asia/Harbin" , 0x01B2F3 },
{ "Asia/Hebron" , 0x01B3DA },
{ "Asia/Ho_Chi_Minh" , 0x01B736 },
{ "Asia/Hong_Kong" , 0x01B7AE },
{ "Asia/Hovd" , 0x01B970 },
{ "Asia/Irkutsk" , 0x01BAE8 },
{ "Asia/Istanbul" , 0x01BCCE },
{ "Asia/Jakarta" , 0x01C0BB },
{ "Asia/Jayapura" , 0x01C165 },
{ "Asia/Jerusalem" , 0x01C201 },
{ "Asia/Kabul" , 0x01C530 },
{ "Asia/Kamchatka" , 0x01C581 },
{ "Asia/Karachi" , 0x01C75D },
{ "Asia/Kashgar" , 0x01C812 },
{ "Asia/Kathmandu" , 0x01C8E3 },
{ "Asia/Katmandu" , 0x01C949 },
{ "Asia/Khandyga" , 0x01C9AF },
{ "Asia/Kolkata" , 0x01CBD4 },
{ "Asia/Krasnoyarsk" , 0x01CC4D },
{ "Asia/Kuala_Lumpur" , 0x01CE35 },
{ "Asia/Kuching" , 0x01CEF2 },
{ "Asia/Kuwait" , 0x01CFE0 },
{ "Asia/Macao" , 0x01D035 },
{ "Asia/Macau" , 0x01D170 },
{ "Asia/Magadan" , 0x01D2AB },
{ "Asia/Makassar" , 0x01D48D },
{ "Asia/Manila" , 0x01D552 },
{ "Asia/Muscat" , 0x01D5D7 },
{ "Asia/Nicosia" , 0x01D62C },
{ "Asia/Novokuznetsk" , 0x01D914 },
{ "Asia/Novosibirsk" , 0x01DB16 },
{ "Asia/Omsk" , 0x01DD01 },
{ "Asia/Oral" , 0x01DEE8 },
{ "Asia/Phnom_Penh" , 0x01E0B8 },
{ "Asia/Pontianak" , 0x01E130 },
{ "Asia/Pyongyang" , 0x01E1F2 },
{ "Asia/Qatar" , 0x01E25F },
{ "Asia/Qyzylorda" , 0x01E2C5 },
{ "Asia/Rangoon" , 0x01E49B },
{ "Asia/Riyadh" , 0x01E513 },
{ "Asia/Saigon" , 0x01E568 },
{ "Asia/Sakhalin" , 0x01E5E0 },
{ "Asia/Samarkand" , 0x01E7D7 },
{ "Asia/Seoul" , 0x01E90D },
{ "Asia/Shanghai" , 0x01E9B1 },
{ "Asia/Singapore" , 0x01EA91 },
{ "Asia/Taipei" , 0x01EB48 },
{ "Asia/Tashkent" , 0x01EC60 },
{ "Asia/Tbilisi" , 0x01ED91 },
{ "Asia/Tehran" , 0x01EF4B },
{ "Asia/Tel_Aviv" , 0x01F1B9 },
{ "Asia/Thimbu" , 0x01F4E8 },
{ "Asia/Thimphu" , 0x01F54E },
{ "Asia/Tokyo" , 0x01F5B4 },
{ "Asia/Ujung_Pandang" , 0x01F63D },
{ "Asia/Ulaanbaatar" , 0x01F6BA },
{ "Asia/Ulan_Bator" , 0x01F815 },
{ "Asia/Urumqi" , 0x01F962 },
{ "Asia/Ust-Nera" , 0x01FA29 },
{ "Asia/Vientiane" , 0x01FC2E },
{ "Asia/Vladivostok" , 0x01FCA6 },
{ "Asia/Yakutsk" , 0x01FE92 },
{ "Asia/Yekaterinburg" , 0x020077 },
{ "Asia/Yerevan" , 0x020282 },
{ "Atlantic/Azores" , 0x020482 },
{ "Atlantic/Bermuda" , 0x020985 },
{ "Atlantic/Canary" , 0x020C66 },
{ "Atlantic/Cape_Verde" , 0x020F3C },
{ "Atlantic/Faeroe" , 0x020FB5 },
{ "Atlantic/Faroe" , 0x021259 },
{ "Atlantic/Jan_Mayen" , 0x0214FD },
{ "Atlantic/Madeira" , 0x02182F },
{ "Atlantic/Reykjavik" , 0x021D38 },
{ "Atlantic/South_Georgia" , 0x021EF1 },
{ "Atlantic/St_Helena" , 0x022103 },
{ "Atlantic/Stanley" , 0x021F35 },
{ "Australia/ACT" , 0x022158 },
{ "Australia/Adelaide" , 0x022475 },
{ "Australia/Brisbane" , 0x0227A1 },
{ "Australia/Broken_Hill" , 0x022868 },
{ "Australia/Canberra" , 0x022BA6 },
{ "Australia/Currie" , 0x022EC3 },
{ "Australia/Darwin" , 0x0231F6 },
{ "Australia/Eucla" , 0x02327C },
{ "Australia/Hobart" , 0x023351 },
{ "Australia/LHI" , 0x0236AF },
{ "Australia/Lindeman" , 0x02394A },
{ "Australia/Lord_Howe" , 0x023A2B },
{ "Australia/Melbourne" , 0x023CD6 },
{ "Australia/North" , 0x023FFB },
{ "Australia/NSW" , 0x02406F },
{ "Australia/Perth" , 0x02438C },
{ "Australia/Queensland" , 0x024464 },
{ "Australia/South" , 0x024510 },
{ "Australia/Sydney" , 0x02482D },
{ "Australia/Tasmania" , 0x024B6A },
{ "Australia/Victoria" , 0x024EAF },
{ "Australia/West" , 0x0251CC },
{ "Australia/Yancowinna" , 0x025282 },
{ "Brazil/Acre" , 0x0255A4 },
{ "Brazil/DeNoronha" , 0x0256A8 },
{ "Brazil/East" , 0x0257C8 },
{ "Brazil/West" , 0x025AA5 },
{ "Canada/Atlantic" , 0x025B9D },
{ "Canada/Central" , 0x026085 },
{ "Canada/East-Saskatchewan" , 0x02698F },
{ "Canada/Eastern" , 0x02649F },
{ "Canada/Mountain" , 0x026B18 },
{ "Canada/Newfoundland" , 0x026E8E },
{ "Canada/Pacific" , 0x0273B9 },
{ "Canada/Saskatchewan" , 0x0277D2 },
{ "Canada/Yukon" , 0x02795B },
{ "CET" , 0x027C5E },
{ "Chile/Continental" , 0x027F67 },
{ "Chile/EasterIsland" , 0x028302 },
{ "CST6CDT" , 0x028644 },
{ "Cuba" , 0x028995 },
{ "EET" , 0x028D08 },
{ "Egypt" , 0x028FBB },
{ "Eire" , 0x02927E },
{ "EST" , 0x02978F },
{ "EST5EDT" , 0x0297D3 },
{ "Etc/GMT" , 0x029B24 },
{ "Etc/GMT+0" , 0x029BF0 },
{ "Etc/GMT+1" , 0x029C7A },
{ "Etc/GMT+10" , 0x029D07 },
{ "Etc/GMT+11" , 0x029D95 },
{ "Etc/GMT+12" , 0x029E23 },
{ "Etc/GMT+2" , 0x029F3E },
{ "Etc/GMT+3" , 0x029FCA },
{ "Etc/GMT+4" , 0x02A056 },
{ "Etc/GMT+5" , 0x02A0E2 },
{ "Etc/GMT+6" , 0x02A16E },
{ "Etc/GMT+7" , 0x02A1FA },
{ "Etc/GMT+8" , 0x02A286 },
{ "Etc/GMT+9" , 0x02A312 },
{ "Etc/GMT-0" , 0x029BAC },
{ "Etc/GMT-1" , 0x029C34 },
{ "Etc/GMT-10" , 0x029CC0 },
{ "Etc/GMT-11" , 0x029D4E },
{ "Etc/GMT-12" , 0x029DDC },
{ "Etc/GMT-13" , 0x029E6A },
{ "Etc/GMT-14" , 0x029EB1 },
{ "Etc/GMT-2" , 0x029EF8 },
{ "Etc/GMT-3" , 0x029F84 },
{ "Etc/GMT-4" , 0x02A010 },
{ "Etc/GMT-5" , 0x02A09C },
{ "Etc/GMT-6" , 0x02A128 },
{ "Etc/GMT-7" , 0x02A1B4 },
{ "Etc/GMT-8" , 0x02A240 },
{ "Etc/GMT-9" , 0x02A2CC },
{ "Etc/GMT0" , 0x029B68 },
{ "Etc/Greenwich" , 0x02A358 },
{ "Etc/UCT" , 0x02A39C },
{ "Etc/Universal" , 0x02A3E0 },
{ "Etc/UTC" , 0x02A424 },
{ "Etc/Zulu" , 0x02A468 },
{ "Europe/Amsterdam" , 0x02A4AC },
{ "Europe/Andorra" , 0x02A8EA },
{ "Europe/Athens" , 0x02AB66 },
{ "Europe/Belfast" , 0x02AEA9 },
{ "Europe/Belgrade" , 0x02B3E0 },
{ "Europe/Berlin" , 0x02B6A9 },
{ "Europe/Bratislava" , 0x02BA0D },
{ "Europe/Brussels" , 0x02BD3F },
{ "Europe/Bucharest" , 0x02C176 },
{ "Europe/Budapest" , 0x02C4A0 },
{ "Europe/Busingen" , 0x02C813 },
{ "Europe/Chisinau" , 0x02CACA },
{ "Europe/Copenhagen" , 0x02CE58 },
{ "Europe/Dublin" , 0x02D162 },
{ "Europe/Gibraltar" , 0x02D673 },
{ "Europe/Guernsey" , 0x02DACA },
{ "Europe/Helsinki" , 0x02E001 },
{ "Europe/Isle_of_Man" , 0x02E2B7 },
{ "Europe/Istanbul" , 0x02E7EE },
{ "Europe/Jersey" , 0x02EBDB },
{ "Europe/Kaliningrad" , 0x02F112 },
{ "Europe/Kiev" , 0x02F378 },
{ "Europe/Lisbon" , 0x02F694 },
{ "Europe/Ljubljana" , 0x02FB98 },
{ "Europe/London" , 0x02FE61 },
{ "Europe/Luxembourg" , 0x030398 },
{ "Europe/Madrid" , 0x0307EE },
{ "Europe/Malta" , 0x030BB4 },
{ "Europe/Mariehamn" , 0x030F6D },
{ "Europe/Minsk" , 0x031223 },
{ "Europe/Monaco" , 0x031431 },
{ "Europe/Moscow" , 0x03186C },
{ "Europe/Nicosia" , 0x031ABD },
{ "Europe/Oslo" , 0x031DA5 },
{ "Europe/Paris" , 0x0320D7 },
{ "Europe/Podgorica" , 0x03251D },
{ "Europe/Prague" , 0x0327E6 },
{ "Europe/Riga" , 0x032B18 },
{ "Europe/Rome" , 0x032E5D },
{ "Europe/Samara" , 0x033220 },
{ "Europe/San_Marino" , 0x033453 },
{ "Europe/Sarajevo" , 0x033816 },
{ "Europe/Simferopol" , 0x033ADF },
{ "Europe/Skopje" , 0x033D2B },
{ "Europe/Sofia" , 0x033FF4 },
{ "Europe/Stockholm" , 0x0342FC },
{ "Europe/Tallinn" , 0x0345AB },
{ "Europe/Tirane" , 0x0348E5 },
{ "Europe/Tiraspol" , 0x034BEB },
{ "Europe/Uzhgorod" , 0x034F79 },
{ "Europe/Vaduz" , 0x035290 },
{ "Europe/Vatican" , 0x03553F },
{ "Europe/Vienna" , 0x035902 },
{ "Europe/Vilnius" , 0x035C2F },
{ "Europe/Volgograd" , 0x035F6E },
{ "Europe/Warsaw" , 0x03616E },
{ "Europe/Zagreb" , 0x03654F },
{ "Europe/Zaporozhye" , 0x036818 },
{ "Europe/Zurich" , 0x036B59 },
{ "Factory" , 0x036E08 },
{ "GB" , 0x036E79 },
{ "GB-Eire" , 0x0373B0 },
{ "GMT" , 0x0378E7 },
{ "GMT+0" , 0x0379B3 },
{ "GMT-0" , 0x03796F },
{ "GMT0" , 0x03792B },
{ "Greenwich" , 0x0379F7 },
{ "Hongkong" , 0x037A3B },
{ "HST" , 0x037BFD },
{ "Iceland" , 0x037C41 },
{ "Indian/Antananarivo" , 0x037DFA },
{ "Indian/Chagos" , 0x037E6E },
{ "Indian/Christmas" , 0x037ED0 },
{ "Indian/Cocos" , 0x037F14 },
{ "Indian/Comoro" , 0x037F58 },
{ "Indian/Kerguelen" , 0x037FAD },
{ "Indian/Mahe" , 0x038002 },
{ "Indian/Maldives" , 0x038057 },
{ "Indian/Mauritius" , 0x0380AC },
{ "Indian/Mayotte" , 0x038122 },
{ "Indian/Reunion" , 0x038177 },
{ "Iran" , 0x0381CC },
{ "Israel" , 0x03843A },
{ "Jamaica" , 0x038769 },
{ "Japan" , 0x03882E },
{ "Kwajalein" , 0x0388B7 },
{ "Libya" , 0x03891A },
{ "MET" , 0x038A23 },
{ "Mexico/BajaNorte" , 0x038D2C },
{ "Mexico/BajaSur" , 0x039095 },
{ "Mexico/General" , 0x0392DA },
{ "MST" , 0x039538 },
{ "MST7MDT" , 0x03957C },
{ "Navajo" , 0x0398CD },
{ "NZ" , 0x039C46 },
{ "NZ-CHAT" , 0x039FC4 },
{ "Pacific/Apia" , 0x03A2AC },
{ "Pacific/Auckland" , 0x03A448 },
{ "Pacific/Chatham" , 0x03A7D4 },
{ "Pacific/Chuuk" , 0x03AACB },
{ "Pacific/Easter" , 0x03AB24 },
{ "Pacific/Efate" , 0x03AE82 },
{ "Pacific/Enderbury" , 0x03AF48 },
{ "Pacific/Fakaofo" , 0x03AFB6 },
{ "Pacific/Fiji" , 0x03B007 },
{ "Pacific/Funafuti" , 0x03B19A },
{ "Pacific/Galapagos" , 0x03B1DE },
{ "Pacific/Gambier" , 0x03B256 },
{ "Pacific/Guadalcanal" , 0x03B2BB },
{ "Pacific/Guam" , 0x03B310 },
{ "Pacific/Honolulu" , 0x03B366 },
{ "Pacific/Johnston" , 0x03B3DD },
{ "Pacific/Kiritimati" , 0x03B45C },
{ "Pacific/Kosrae" , 0x03B4C7 },
{ "Pacific/Kwajalein" , 0x03B524 },
{ "Pacific/Majuro" , 0x03B590 },
{ "Pacific/Marquesas" , 0x03B5EF },
{ "Pacific/Midway" , 0x03B656 },
{ "Pacific/Nauru" , 0x03B6E0 },
{ "Pacific/Niue" , 0x03B758 },
{ "Pacific/Norfolk" , 0x03B7B6 },
{ "Pacific/Noumea" , 0x03B80B },
{ "Pacific/Pago_Pago" , 0x03B89B },
{ "Pacific/Palau" , 0x03B924 },
{ "Pacific/Pitcairn" , 0x03B968 },
{ "Pacific/Pohnpei" , 0x03B9BD },
{ "Pacific/Ponape" , 0x03BA12 },
{ "Pacific/Port_Moresby" , 0x03BA57 },
{ "Pacific/Rarotonga" , 0x03BA9B },
{ "Pacific/Saipan" , 0x03BB77 },
{ "Pacific/Samoa" , 0x03BBDA },
{ "Pacific/Tahiti" , 0x03BC63 },
{ "Pacific/Tarawa" , 0x03BCC8 },
{ "Pacific/Tongatapu" , 0x03BD1C },
{ "Pacific/Truk" , 0x03BDA8 },
{ "Pacific/Wake" , 0x03BDED },
{ "Pacific/Wallis" , 0x03BE3D },
{ "Pacific/Yap" , 0x03BE81 },
{ "Poland" , 0x03BEC6 },
{ "Portugal" , 0x03C2A7 },
{ "PRC" , 0x03C7A3 },
{ "PST8PDT" , 0x03C854 },
{ "ROC" , 0x03CBA5 },
{ "ROK" , 0x03CCBD },
{ "Singapore" , 0x03CD61 },
{ "Turkey" , 0x03CE18 },
{ "UCT" , 0x03D205 },
{ "Universal" , 0x03D249 },
{ "US/Alaska" , 0x03D28D },
{ "US/Aleutian" , 0x03D5F6 },
{ "US/Arizona" , 0x03D95C },
{ "US/Central" , 0x03D9EA },
{ "US/East-Indiana" , 0x03E3F4 },
{ "US/Eastern" , 0x03DEF5 },
{ "US/Hawaii" , 0x03E65E },
{ "US/Indiana-Starke" , 0x03E6CF },
{ "US/Michigan" , 0x03EA40 },
{ "US/Mountain" , 0x03ED77 },
{ "US/Pacific" , 0x03F0F0 },
{ "US/Pacific-New" , 0x03F4F5 },
{ "US/Samoa" , 0x03F8FA },
{ "UTC" , 0x03F983 },
{ "W-SU" , 0x03FC7A },
{ "WET" , 0x03F9C7 },
{ "Zulu" , 0x03FEB4 },
{ "Antarctica/Vostok" , 0x0188EE },
{ "Arctic/Longyearbyen" , 0x01895F },
{ "Asia/Aden" , 0x018C91 },
{ "Asia/Almaty" , 0x018CE6 },
{ "Asia/Amman" , 0x018E65 },
{ "Asia/Anadyr" , 0x01911B },
{ "Asia/Aqtau" , 0x019300 },
{ "Asia/Aqtobe" , 0x0194FF },
{ "Asia/Ashgabat" , 0x0196B7 },
{ "Asia/Ashkhabad" , 0x0197D4 },
{ "Asia/Baghdad" , 0x0198F1 },
{ "Asia/Bahrain" , 0x019A66 },
{ "Asia/Baku" , 0x019ACC },
{ "Asia/Bangkok" , 0x019DB4 },
{ "Asia/Beirut" , 0x019E09 },
{ "Asia/Bishkek" , 0x01A116 },
{ "Asia/Brunei" , 0x01A2C2 },
{ "Asia/Calcutta" , 0x01A324 },
{ "Asia/Choibalsan" , 0x01A39D },
{ "Asia/Chongqing" , 0x01A516 },
{ "Asia/Chungking" , 0x01A605 },
{ "Asia/Colombo" , 0x01A6B4 },
{ "Asia/Dacca" , 0x01A750 },
{ "Asia/Damascus" , 0x01A7F6 },
{ "Asia/Dhaka" , 0x01AB46 },
{ "Asia/Dili" , 0x01ABEC },
{ "Asia/Dubai" , 0x01AC76 },
{ "Asia/Dushanbe" , 0x01ACCB },
{ "Asia/Gaza" , 0x01ADCE },
{ "Asia/Harbin" , 0x01B121 },
{ "Asia/Hebron" , 0x01B208 },
{ "Asia/Ho_Chi_Minh" , 0x01B564 },
{ "Asia/Hong_Kong" , 0x01B5DC },
{ "Asia/Hovd" , 0x01B79E },
{ "Asia/Irkutsk" , 0x01B916 },
{ "Asia/Istanbul" , 0x01BAFC },
{ "Asia/Jakarta" , 0x01BEE9 },
{ "Asia/Jayapura" , 0x01BF93 },
{ "Asia/Jerusalem" , 0x01C02F },
{ "Asia/Kabul" , 0x01C35E },
{ "Asia/Kamchatka" , 0x01C3AF },
{ "Asia/Karachi" , 0x01C58B },
{ "Asia/Kashgar" , 0x01C640 },
{ "Asia/Kathmandu" , 0x01C711 },
{ "Asia/Katmandu" , 0x01C777 },
{ "Asia/Khandyga" , 0x01C7DD },
{ "Asia/Kolkata" , 0x01CA02 },
{ "Asia/Krasnoyarsk" , 0x01CA7B },
{ "Asia/Kuala_Lumpur" , 0x01CC63 },
{ "Asia/Kuching" , 0x01CD20 },
{ "Asia/Kuwait" , 0x01CE0E },
{ "Asia/Macao" , 0x01CE63 },
{ "Asia/Macau" , 0x01CF9E },
{ "Asia/Magadan" , 0x01D0D9 },
{ "Asia/Makassar" , 0x01D2BB },
{ "Asia/Manila" , 0x01D380 },
{ "Asia/Muscat" , 0x01D405 },
{ "Asia/Nicosia" , 0x01D45A },
{ "Asia/Novokuznetsk" , 0x01D742 },
{ "Asia/Novosibirsk" , 0x01D944 },
{ "Asia/Omsk" , 0x01DB2F },
{ "Asia/Oral" , 0x01DD16 },
{ "Asia/Phnom_Penh" , 0x01DEE6 },
{ "Asia/Pontianak" , 0x01DF5E },
{ "Asia/Pyongyang" , 0x01E020 },
{ "Asia/Qatar" , 0x01E08D },
{ "Asia/Qyzylorda" , 0x01E0F3 },
{ "Asia/Rangoon" , 0x01E2C9 },
{ "Asia/Riyadh" , 0x01E341 },
{ "Asia/Saigon" , 0x01E396 },
{ "Asia/Sakhalin" , 0x01E40E },
{ "Asia/Samarkand" , 0x01E605 },
{ "Asia/Seoul" , 0x01E73B },
{ "Asia/Shanghai" , 0x01E7DF },
{ "Asia/Singapore" , 0x01E8BF },
{ "Asia/Taipei" , 0x01E976 },
{ "Asia/Tashkent" , 0x01EA8E },
{ "Asia/Tbilisi" , 0x01EBBF },
{ "Asia/Tehran" , 0x01ED79 },
{ "Asia/Tel_Aviv" , 0x01EFE7 },
{ "Asia/Thimbu" , 0x01F316 },
{ "Asia/Thimphu" , 0x01F37C },
{ "Asia/Tokyo" , 0x01F3E2 },
{ "Asia/Ujung_Pandang" , 0x01F46B },
{ "Asia/Ulaanbaatar" , 0x01F4E8 },
{ "Asia/Ulan_Bator" , 0x01F643 },
{ "Asia/Urumqi" , 0x01F790 },
{ "Asia/Ust-Nera" , 0x01F857 },
{ "Asia/Vientiane" , 0x01FA5C },
{ "Asia/Vladivostok" , 0x01FAD4 },
{ "Asia/Yakutsk" , 0x01FCC0 },
{ "Asia/Yekaterinburg" , 0x01FEA5 },
{ "Asia/Yerevan" , 0x0200B0 },
{ "Atlantic/Azores" , 0x0202B0 },
{ "Atlantic/Bermuda" , 0x0207B3 },
{ "Atlantic/Canary" , 0x020A94 },
{ "Atlantic/Cape_Verde" , 0x020D6A },
{ "Atlantic/Faeroe" , 0x020DE3 },
{ "Atlantic/Faroe" , 0x021087 },
{ "Atlantic/Jan_Mayen" , 0x02132B },
{ "Atlantic/Madeira" , 0x02165D },
{ "Atlantic/Reykjavik" , 0x021B66 },
{ "Atlantic/South_Georgia" , 0x021D1F },
{ "Atlantic/St_Helena" , 0x021F31 },
{ "Atlantic/Stanley" , 0x021D63 },
{ "Australia/ACT" , 0x021F86 },
{ "Australia/Adelaide" , 0x0222A3 },
{ "Australia/Brisbane" , 0x0225CF },
{ "Australia/Broken_Hill" , 0x022696 },
{ "Australia/Canberra" , 0x0229D4 },
{ "Australia/Currie" , 0x022CF1 },
{ "Australia/Darwin" , 0x023024 },
{ "Australia/Eucla" , 0x0230AA },
{ "Australia/Hobart" , 0x02317F },
{ "Australia/LHI" , 0x0234DD },
{ "Australia/Lindeman" , 0x023778 },
{ "Australia/Lord_Howe" , 0x023859 },
{ "Australia/Melbourne" , 0x023B04 },
{ "Australia/North" , 0x023E29 },
{ "Australia/NSW" , 0x023E9D },
{ "Australia/Perth" , 0x0241BA },
{ "Australia/Queensland" , 0x024292 },
{ "Australia/South" , 0x02433E },
{ "Australia/Sydney" , 0x02465B },
{ "Australia/Tasmania" , 0x024998 },
{ "Australia/Victoria" , 0x024CDD },
{ "Australia/West" , 0x024FFA },
{ "Australia/Yancowinna" , 0x0250B0 },
{ "Brazil/Acre" , 0x0253D2 },
{ "Brazil/DeNoronha" , 0x0254D6 },
{ "Brazil/East" , 0x0255F6 },
{ "Brazil/West" , 0x0258D3 },
{ "Canada/Atlantic" , 0x0259CB },
{ "Canada/Central" , 0x025EB3 },
{ "Canada/East-Saskatchewan" , 0x0267BD },
{ "Canada/Eastern" , 0x0262CD },
{ "Canada/Mountain" , 0x026946 },
{ "Canada/Newfoundland" , 0x026CBC },
{ "Canada/Pacific" , 0x0271E7 },
{ "Canada/Saskatchewan" , 0x027600 },
{ "Canada/Yukon" , 0x027789 },
{ "CET" , 0x027A8C },
{ "Chile/Continental" , 0x027D95 },
{ "Chile/EasterIsland" , 0x028130 },
{ "CST6CDT" , 0x028472 },
{ "Cuba" , 0x0287C3 },
{ "EET" , 0x028B36 },
{ "Egypt" , 0x028DE9 },
{ "Eire" , 0x0290AC },
{ "EST" , 0x0295BD },
{ "EST5EDT" , 0x029601 },
{ "Etc/GMT" , 0x029952 },
{ "Etc/GMT+0" , 0x029A1E },
{ "Etc/GMT+1" , 0x029AA8 },
{ "Etc/GMT+10" , 0x029B35 },
{ "Etc/GMT+11" , 0x029BC3 },
{ "Etc/GMT+12" , 0x029C51 },
{ "Etc/GMT+2" , 0x029D6C },
{ "Etc/GMT+3" , 0x029DF8 },
{ "Etc/GMT+4" , 0x029E84 },
{ "Etc/GMT+5" , 0x029F10 },
{ "Etc/GMT+6" , 0x029F9C },
{ "Etc/GMT+7" , 0x02A028 },
{ "Etc/GMT+8" , 0x02A0B4 },
{ "Etc/GMT+9" , 0x02A140 },
{ "Etc/GMT-0" , 0x0299DA },
{ "Etc/GMT-1" , 0x029A62 },
{ "Etc/GMT-10" , 0x029AEE },
{ "Etc/GMT-11" , 0x029B7C },
{ "Etc/GMT-12" , 0x029C0A },
{ "Etc/GMT-13" , 0x029C98 },
{ "Etc/GMT-14" , 0x029CDF },
{ "Etc/GMT-2" , 0x029D26 },
{ "Etc/GMT-3" , 0x029DB2 },
{ "Etc/GMT-4" , 0x029E3E },
{ "Etc/GMT-5" , 0x029ECA },
{ "Etc/GMT-6" , 0x029F56 },
{ "Etc/GMT-7" , 0x029FE2 },
{ "Etc/GMT-8" , 0x02A06E },
{ "Etc/GMT-9" , 0x02A0FA },
{ "Etc/GMT0" , 0x029996 },
{ "Etc/Greenwich" , 0x02A186 },
{ "Etc/UCT" , 0x02A1CA },
{ "Etc/Universal" , 0x02A20E },
{ "Etc/UTC" , 0x02A252 },
{ "Etc/Zulu" , 0x02A296 },
{ "Europe/Amsterdam" , 0x02A2DA },
{ "Europe/Andorra" , 0x02A718 },
{ "Europe/Athens" , 0x02A994 },
{ "Europe/Belfast" , 0x02ACD7 },
{ "Europe/Belgrade" , 0x02B20E },
{ "Europe/Berlin" , 0x02B4D7 },
{ "Europe/Bratislava" , 0x02B83B },
{ "Europe/Brussels" , 0x02BB6D },
{ "Europe/Bucharest" , 0x02BFA4 },
{ "Europe/Budapest" , 0x02C2CE },
{ "Europe/Busingen" , 0x02C641 },
{ "Europe/Chisinau" , 0x02C8F8 },
{ "Europe/Copenhagen" , 0x02CC86 },
{ "Europe/Dublin" , 0x02CF90 },
{ "Europe/Gibraltar" , 0x02D4A1 },
{ "Europe/Guernsey" , 0x02D8F8 },
{ "Europe/Helsinki" , 0x02DE2F },
{ "Europe/Isle_of_Man" , 0x02E0E5 },
{ "Europe/Istanbul" , 0x02E61C },
{ "Europe/Jersey" , 0x02EA09 },
{ "Europe/Kaliningrad" , 0x02EF40 },
{ "Europe/Kiev" , 0x02F1A6 },
{ "Europe/Lisbon" , 0x02F4C2 },
{ "Europe/Ljubljana" , 0x02F9C6 },
{ "Europe/London" , 0x02FC8F },
{ "Europe/Luxembourg" , 0x0301C6 },
{ "Europe/Madrid" , 0x03061C },
{ "Europe/Malta" , 0x0309E2 },
{ "Europe/Mariehamn" , 0x030D9B },
{ "Europe/Minsk" , 0x031051 },
{ "Europe/Monaco" , 0x03125F },
{ "Europe/Moscow" , 0x03169A },
{ "Europe/Nicosia" , 0x0318EB },
{ "Europe/Oslo" , 0x031BD3 },
{ "Europe/Paris" , 0x031F05 },
{ "Europe/Podgorica" , 0x03234B },
{ "Europe/Prague" , 0x032614 },
{ "Europe/Riga" , 0x032946 },
{ "Europe/Rome" , 0x032C8B },
{ "Europe/Samara" , 0x03304E },
{ "Europe/San_Marino" , 0x033281 },
{ "Europe/Sarajevo" , 0x033644 },
{ "Europe/Simferopol" , 0x03390D },
{ "Europe/Skopje" , 0x033C38 },
{ "Europe/Sofia" , 0x033F01 },
{ "Europe/Stockholm" , 0x034209 },
{ "Europe/Tallinn" , 0x0344B8 },
{ "Europe/Tirane" , 0x0347F2 },
{ "Europe/Tiraspol" , 0x034AF8 },
{ "Europe/Uzhgorod" , 0x034E86 },
{ "Europe/Vaduz" , 0x03519D },
{ "Europe/Vatican" , 0x03544C },
{ "Europe/Vienna" , 0x03580F },
{ "Europe/Vilnius" , 0x035B3C },
{ "Europe/Volgograd" , 0x035E7B },
{ "Europe/Warsaw" , 0x03607B },
{ "Europe/Zagreb" , 0x03645C },
{ "Europe/Zaporozhye" , 0x036725 },
{ "Europe/Zurich" , 0x036A66 },
{ "Factory" , 0x036D15 },
{ "GB" , 0x036D86 },
{ "GB-Eire" , 0x0372BD },
{ "GMT" , 0x0377F4 },
{ "GMT+0" , 0x0378C0 },
{ "GMT-0" , 0x03787C },
{ "GMT0" , 0x037838 },
{ "Greenwich" , 0x037904 },
{ "Hongkong" , 0x037948 },
{ "HST" , 0x037B0A },
{ "Iceland" , 0x037B4E },
{ "Indian/Antananarivo" , 0x037D07 },
{ "Indian/Chagos" , 0x037D7B },
{ "Indian/Christmas" , 0x037DDD },
{ "Indian/Cocos" , 0x037E21 },
{ "Indian/Comoro" , 0x037E65 },
{ "Indian/Kerguelen" , 0x037EBA },
{ "Indian/Mahe" , 0x037F0F },
{ "Indian/Maldives" , 0x037F64 },
{ "Indian/Mauritius" , 0x037FB9 },
{ "Indian/Mayotte" , 0x03802F },
{ "Indian/Reunion" , 0x038084 },
{ "Iran" , 0x0380D9 },
{ "Israel" , 0x038347 },
{ "Jamaica" , 0x038676 },
{ "Japan" , 0x03873B },
{ "Kwajalein" , 0x0387C4 },
{ "Libya" , 0x038827 },
{ "MET" , 0x038930 },
{ "Mexico/BajaNorte" , 0x038C39 },
{ "Mexico/BajaSur" , 0x038FA2 },
{ "Mexico/General" , 0x0391E7 },
{ "MST" , 0x039445 },
{ "MST7MDT" , 0x039489 },
{ "Navajo" , 0x0397DA },
{ "NZ" , 0x039B53 },
{ "NZ-CHAT" , 0x039ED1 },
{ "Pacific/Apia" , 0x03A1B9 },
{ "Pacific/Auckland" , 0x03A355 },
{ "Pacific/Chatham" , 0x03A6E1 },
{ "Pacific/Chuuk" , 0x03A9D8 },
{ "Pacific/Easter" , 0x03AA31 },
{ "Pacific/Efate" , 0x03AD8F },
{ "Pacific/Enderbury" , 0x03AE55 },
{ "Pacific/Fakaofo" , 0x03AEC3 },
{ "Pacific/Fiji" , 0x03AF14 },
{ "Pacific/Funafuti" , 0x03B0A7 },
{ "Pacific/Galapagos" , 0x03B0EB },
{ "Pacific/Gambier" , 0x03B163 },
{ "Pacific/Guadalcanal" , 0x03B1C8 },
{ "Pacific/Guam" , 0x03B21D },
{ "Pacific/Honolulu" , 0x03B273 },
{ "Pacific/Johnston" , 0x03B2EA },
{ "Pacific/Kiritimati" , 0x03B369 },
{ "Pacific/Kosrae" , 0x03B3D4 },
{ "Pacific/Kwajalein" , 0x03B431 },
{ "Pacific/Majuro" , 0x03B49D },
{ "Pacific/Marquesas" , 0x03B4FC },
{ "Pacific/Midway" , 0x03B563 },
{ "Pacific/Nauru" , 0x03B5ED },
{ "Pacific/Niue" , 0x03B665 },
{ "Pacific/Norfolk" , 0x03B6C3 },
{ "Pacific/Noumea" , 0x03B718 },
{ "Pacific/Pago_Pago" , 0x03B7A8 },
{ "Pacific/Palau" , 0x03B831 },
{ "Pacific/Pitcairn" , 0x03B875 },
{ "Pacific/Pohnpei" , 0x03B8CA },
{ "Pacific/Ponape" , 0x03B91F },
{ "Pacific/Port_Moresby" , 0x03B964 },
{ "Pacific/Rarotonga" , 0x03B9A8 },
{ "Pacific/Saipan" , 0x03BA84 },
{ "Pacific/Samoa" , 0x03BAE7 },
{ "Pacific/Tahiti" , 0x03BB70 },
{ "Pacific/Tarawa" , 0x03BBD5 },
{ "Pacific/Tongatapu" , 0x03BC29 },
{ "Pacific/Truk" , 0x03BCB5 },
{ "Pacific/Wake" , 0x03BCFA },
{ "Pacific/Wallis" , 0x03BD4A },
{ "Pacific/Yap" , 0x03BD8E },
{ "Poland" , 0x03BDD3 },
{ "Portugal" , 0x03C1B4 },
{ "PRC" , 0x03C6B0 },
{ "PST8PDT" , 0x03C761 },
{ "ROC" , 0x03CAB2 },
{ "ROK" , 0x03CBCA },
{ "Singapore" , 0x03CC6E },
{ "Turkey" , 0x03CD25 },
{ "UCT" , 0x03D112 },
{ "Universal" , 0x03D156 },
{ "US/Alaska" , 0x03D19A },
{ "US/Aleutian" , 0x03D503 },
{ "US/Arizona" , 0x03D869 },
{ "US/Central" , 0x03D8F7 },
{ "US/East-Indiana" , 0x03E301 },
{ "US/Eastern" , 0x03DE02 },
{ "US/Hawaii" , 0x03E56B },
{ "US/Indiana-Starke" , 0x03E5DC },
{ "US/Michigan" , 0x03E94D },
{ "US/Mountain" , 0x03EC84 },
{ "US/Pacific" , 0x03EFFD },
{ "US/Pacific-New" , 0x03F402 },
{ "US/Samoa" , 0x03F807 },
{ "UTC" , 0x03F890 },
{ "W-SU" , 0x03FB87 },
{ "WET" , 0x03F8D4 },
{ "Zulu" , 0x03FDC1 },
};
/* This is a generated file, do not modify */
const unsigned char timelib_timezone_db_data_builtin[261880] = {
const unsigned char timelib_timezone_db_data_builtin[261637] = {
/* Africa/Abidjan */
@@ -7453,38 +7452,6 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
0x11, 0x58, 0x00, 0x00, 0x00, 0x18, 0x53, 0x79, 0x6F, 0x77, 0x61, 0x20, 0x53, 0x74, 0x61, 0x74,
0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x45, 0x20, 0x4F, 0x6E, 0x67, 0x75, 0x6C, 0x20, 0x49,
/* Antarctica/Troll */
0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0x42, 0x0D, 0x47, 0x00,
0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, 0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10,
0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10,
0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90,
0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90,
0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10,
0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10,
0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10,
0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90,
0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, 0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90,
0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, 0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90,
0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, 0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10,
0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, 0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10,
0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, 0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90,
0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, 0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90,
0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, 0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90,
0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x55, 0x54, 0x43, 0x00,
0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x1B, 0x72, 0xCD, 0x01, 0x16, 0x86, 0xBC,
0x00, 0x00, 0x00, 0x1E, 0x54, 0x72, 0x6F, 0x6C, 0x6C, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F,
0x6E, 0x2C, 0x20, 0x51, 0x75, 0x65, 0x65, 0x6E, 0x20, 0x4D, 0x61, 0x75, 0x64, 0x20, 0x4C, 0x61,
0x6E, 0x64,
/* Antarctica/Vostok */
0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
@@ -14984,9 +14951,9 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
0xAA, 0x01, 0x2E, 0xC2, 0x82, 0x00, 0x00, 0x00, 0x00,
/* Europe/Simferopol */
0x50, 0x48, 0x50, 0x31, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x1E, 0xAA, 0x19, 0xA4, 0x20,
0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1E, 0xAA, 0x19, 0xA4, 0x20,
0xB5, 0xA4, 0x19, 0x60, 0xCB, 0x04, 0x8D, 0xD0, 0xCC, 0xE7, 0x4B, 0x10, 0xCD, 0xA9, 0x17, 0x90,
0xCE, 0xA2, 0x43, 0x10, 0xCF, 0x92, 0x34, 0x10, 0xCF, 0x9F, 0x38, 0xE0, 0x15, 0x27, 0xA7, 0xD0,
0x16, 0x18, 0xDC, 0x40, 0x17, 0x08, 0xDB, 0x50, 0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xEA, 0x0E, 0xD0,
@@ -15005,22 +14972,36 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10,
0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90,
0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x5E, 0x80, 0x01, 0x02, 0x05, 0x03,
0x04, 0x03, 0x04, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07,
0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x02, 0x01, 0x09, 0x01, 0x09, 0x01, 0x09, 0x06, 0x02, 0x06,
0x02, 0x06, 0x08, 0x07, 0x02, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90,
0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10,
0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10,
0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10,
0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90,
0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, 0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90,
0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, 0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90,
0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, 0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10,
0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, 0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10,
0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, 0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90,
0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, 0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90,
0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, 0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90,
0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02,
0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
0x08, 0x07, 0x02, 0x01, 0x09, 0x01, 0x09, 0x01, 0x09, 0x06, 0x02, 0x06, 0x02, 0x06, 0x08, 0x07,
0x02, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0C, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x1C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x38, 0x40,
0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00,
0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04,
0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x53, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53,
0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45,
0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0xCD,
0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77,
0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x43, 0x72, 0x69, 0x6D, 0x65, 0x61,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x00,
0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x19, 0x00,
0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x53, 0x4D, 0x54, 0x00, 0x45,
0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x01, 0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x0E, 0x63, 0x65, 0x6E,
0x74, 0x72, 0x61, 0x6C, 0x20, 0x43, 0x72, 0x69, 0x6D, 0x65, 0x61,
/* Europe/Skopje */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18435,4 +18416,4 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
0x00, 0x00, 0x00, 0x00, };
const timelib_tzdb timezonedb_builtin = { "2014.2", 580, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
const timelib_tzdb timezonedb_builtin = { "2014.1", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
-4
View File
@@ -2587,10 +2587,6 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
tzi = php_date_parse_tzfile(Z_STRVAL_PP(z_timezone), DATE_TIMEZONEDB TSRMLS_CC);
if (tzi == NULL) {
return 0;
}
ALLOC_INIT_ZVAL(tmp_obj);
tzobj = zend_object_store_get_object(php_date_instantiate(date_ce_timezone, tmp_obj TSRMLS_CC) TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
-11
View File
@@ -1,11 +0,0 @@
--TEST--
Test for bug #66721: __wakeup of DateTime segfaults when invalid object data is supplied
--CREDITS--
Boro Sitnikovski <buritomath@yahoo.com>
--FILE--
<?php
$y = 'O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-15 02:00:51";s:13:"timezone_type";i:3;s:8:"timezone";s:10:"1234567890";}';
var_dump(unserialize($y));
?>
--EXPECTF--
Fatal error: Invalid serialization data for DateTime object in %s on line %d
-6
View File
@@ -1509,12 +1509,6 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p
if (uri->scheme != NULL) {
/* absolute file uris - libxml only supports localhost or empty host */
#ifdef PHP_WIN32
if (strncasecmp(source, "file://",7) == 0 && ':' == source[8]) {
isFileUri = 1;
source += 7;
} else
#endif
if (strncasecmp(source, "file:///",8) == 0) {
isFileUri = 1;
#ifdef PHP_WIN32
+6 -8
View File
@@ -493,14 +493,12 @@ apprentice_unmap(struct magic_map *map)
if (map == NULL)
return;
if (map->p != php_magic_database) {
if (map->p == NULL) {
int j;
for (j = 0; j < MAGIC_SETS; j++) {
if (map->magic[j]) {
efree(map->magic[j]);
}
}
} else {
int j;
for (j = 0; j < MAGIC_SETS; j++) {
if (map->magic[j])
efree(map->magic[j]);
}
if (map->p != NULL) {
efree(map->p);
}
}
+4
View File
@@ -1,3 +1,7 @@
dnl
dnl $Id$
dnl
PHP_ARG_WITH(interbase,for InterBase support,
[ --with-interbase[=DIR] Include InterBase support. DIR is the InterBase base
install directory [/usr/interbase]])
+1
View File
@@ -1,3 +1,4 @@
// $Id$
// vim:ft=javascript
ARG_WITH("interbase", "InterBase support", "no");
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+2
View File
@@ -18,6 +18,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+2
View File
@@ -18,6 +18,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_IBASE_INCLUDES_H
#define PHP_IBASE_INCLUDES_H
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
/**
* This UDF library adds the ability to call PHP functions from SQL
* statements. Because of SQL's strong typing, you will have to declare
+2
View File
@@ -18,6 +18,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_INTERBASE_H
#define PHP_INTERBASE_H
+1 -1
View File
@@ -1,4 +1,4 @@
<?php
<?php /* $Id$ */
srand((double)microtime()*1000000);
+1 -1
View File
@@ -1,4 +1,4 @@
<?php
<?php /* $Id$ */
if (!extension_loaded("interbase")) print "skip interbase extension not available";
require("interbase.inc");
+1 -4
View File
@@ -13,10 +13,7 @@ foreach($funcs as $func) {
if($rfunc->getNumberOfRequiredParameters() == 0) {
continue;
}
try {
$res = $func($arg);
} catch (Exception $e) { continue; }
$res = $func($arg);
if($res != false) {
echo "$func: ";
var_dump($res);
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #50590 (IntlDateFormatter::parse result is limited to the integer range)
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
+5 -3
View File
@@ -1,9 +1,11 @@
--TEST--
Bug #62070: Collator::getSortKey() returns garbage
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '49') < 0) die('skip for ICU >= 49'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') >= 0) die('skip for ICU < 53.1'); ?>
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '49') < 0)
die('skip ICU >= 49 only');
--FILE--
<?php
$s1 = 'Hello';
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #62070: Collator::getSortKey() returns garbage
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
--FILE--
<?php
$s1 = 'Hello';
$coll = collator_create('en_US');
$res = collator_get_sort_key($coll, $s1);
echo urlencode($res);
--EXPECT--
71%3F%3FE%01%09%01%DC%08
-1
View File
@@ -2,7 +2,6 @@
asort()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
-243
View File
@@ -1,243 +0,0 @@
--TEST--
asort()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Sort associative arrays using various locales.
*/
$test_num = 1;
/*
* Sort various arrays in specified locale.
*/
function sort_arrays( $locale, $test_arrays, $sort_flag = Collator::SORT_REGULAR )
{
$res_str = '';
$coll = ut_coll_create( $locale );
foreach( $test_arrays as $test_array )
{
// Try to sort test data.
$res_val = ut_coll_asort( $coll, $test_array, $sort_flag );
// Return output data.
$res_dump = "\n" . dump( $test_array ) .
"\n Result: " . dump( $res_val );
// Preppend test signature to output string
$md5 = md5( $res_dump );
global $test_num;
$res_str .= "\n\n".
"Test $test_num.$md5:" .
$res_dump;
++$test_num;
}
return $res_str;
}
/*
* Test main function.
*/
function ut_main()
{
global $test_num;
$test_num = 1;
$res_str = '';
// Sort an array in SORT_REGULAR mode using en_US locale.
$test_params = array(
array( 'd' => 'y' ,
'c' => 'i' ,
'a' => 'k' ),
array( 'a' => 'a' ,
'b' => 'aaa',
'c' => 'aa' ),
array( 'a' => 'a' ,
'aaa'=> 'a' ,
'aa' => 'a' ),
array( '1' => 'abc',
'5' => '!' ,
'2' => null ,
'7' => '' ),
array( '1' => '100',
'2' => '25' ,
'3' => '36' ),
array( '1' => 5 ,
'2' => '30' ,
'3' => 2 )
);
$res_str .= sort_arrays( 'en_US', $test_params );
// Sort an array in SORT_STRING mode using en_US locale.
$test_params = array(
array( '1' => '100',
'2' => '25' ,
'3' => '36' ),
array( '1' => 5 ,
'2' => '30' ,
'3' => 2 ),
array( '1' => 'd' ,
'2' => '' ,
'3' => ' a' ),
array( '1' => 'y' ,
'2' => 'k' ,
'3' => 'i' )
);
$res_str .= sort_arrays( 'en_US', $test_params, Collator::SORT_STRING );
// Sort a non-ASCII array using ru_RU locale.
$test_params = array(
array( 'п' => 'у',
'б' => 'в',
'е' => 'а' ),
array( '1' => 'п',
'4' => '',
'7' => 'd',
'2' => 'пп' )
);
$res_str .= sort_arrays( 'ru_RU', $test_params );
// Sort an array using Lithuanian locale.
$test_params = array(
array( 'd' => 'y',
'c' => 'i',
'a' => 'k' )
);
$res_str .= sort_arrays( 'lt_LT', $test_params );
return $res_str . "\n";
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
Test 1.162b81ac12878b817fc39063097e45b5:
array (
'c' => 'i',
'a' => 'k',
'd' => 'y',
)
Result: true
Test 2.93d96e22f692d8a281b0a389f01f8d1e:
array (
'a' => 'a',
'c' => 'aa',
'b' => 'aaa',
)
Result: true
Test 3.9f25de4482bc7b58de508e278113317c:
array (
'aa' => 'a',
'aaa' => 'a',
'a' => 'a',
)
Result: true
Test 4.a85a41ea78e45b651080cfd98c0b431d:
array (
7 => '',
2 => NULL,
5 => '!',
1 => 'abc',
)
Result: true
Test 5.99dc71f405b286e03d489061b36e6900:
array (
2 => '25',
3 => '36',
1 => '100',
)
Result: true
Test 6.bf5bba243307c9d12934e756ad4be190:
array (
3 => 2,
1 => 5,
2 => '30',
)
Result: true
Test 7.e4ee7024c61476e9e7a6c28b5e47df6f:
array (
1 => '100',
2 => '25',
3 => '36',
)
Result: true
Test 8.5fa7033dd43784be0db1474eb48b83c8:
array (
3 => 2,
2 => '30',
1 => 5,
)
Result: true
Test 9.588cdf4692bc09aa92ffe7e48f9e4579:
array (
2 => '',
3 => ' a',
1 => 'd',
)
Result: true
Test 10.be02641a47ebcccd23e4183ca3a415f7:
array (
3 => 'i',
2 => 'k',
1 => 'y',
)
Result: true
Test 11.153d9b11d1e5936afc917a94a4e11f34:
array (
'е' => 'а',
'б' => 'в',
'п' => 'у',
)
Result: true
Test 12.e1f5cb037b564dce39ffbd0a61562d59:
array (
4 => '',
1 => 'п',
2 => 'пп',
7 => 'd',
)
Result: true
Test 13.8800d48abb960a59002eef77f1d73ae0:
array (
'c' => 'i',
'd' => 'y',
'a' => 'k',
)
Result: true
-1
View File
@@ -2,7 +2,6 @@
compare()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
@@ -1,135 +0,0 @@
--TEST--
compare()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Compare various string pairs using various locales.
*/
/*
* Converts comparison result to a character.
*/
function cmp_to_char( $comp_res )
{
switch( $comp_res )
{
case 0: // UCOL_EQUAL
return '=';
case 1: // UCOL_GREATER
return '>';
case -1: // UCOL_LESS
return '<';
default:
return '?';
}
}
/*
* Compare string pairs in the given array
* using specified locale.
*/
function compare_pairs( $locale, $test_array )
{
$res_str = '';
$coll = ut_coll_create( $locale );
foreach( $test_array as $test_strings )
{
list( $str1, $str2 ) = $test_strings;
// Compare strings.
$res_val = cmp_to_char( ut_coll_compare( $coll, $str1, $str2 ) );
// Concatenate result strings.
$res_str .= dump( $str1 ) .
' ' . $res_val . ' ' .
dump( $str2 ) . "\n";
}
return $res_str;
}
function ut_main()
{
$res_str = '';
// Compare strings using en_US locale.
$test_params = array(
array( 'abc', 'abc' ),
array( 'Abc', 'abc' ),
array( 'a' , 'abc' ),
array( 'a' , '' ),
array( '' , '' ),
array( 'a' , 'b' ),
array( 'ab' , 'b' ),
array( 'ab' , 'a' ),
array( 123 , 'abc' ),
array( 'ac' , null ),
array( '.' , '.' ),
// Try to compare long strings.
array( 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcde',
'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdea'),
array( null , null )
);
$res_str .= compare_pairs( 'en_US', $test_params );
// Compare strings using ru_RU locale.
$test_params = array(
array( 'а', 'б' ),
array( 'а', 'аа' ),
array( 'аб', 'ба' ),
array( 'а', ',' ),
array( 'а', 'b' ),
array( 'а', 'bb' ),
array( 'а', 'ab' ),
array( 'а', null )
);
$res_str .= compare_pairs( 'ru_RU', $test_params );
// Compare strings using lt_LT locale.
$test_params = array(
array( 'y', 'k' )
);
$res_str .= compare_pairs( 'lt_LT', $test_params );
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
'abc' = 'abc'
'Abc' > 'abc'
'a' < 'abc'
'a' > ''
'' = ''
'a' < 'b'
'ab' < 'b'
'ab' > 'a'
123 < 'abc'
'ac' > NULL
'.' = '.'
'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcde' < 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdea'
NULL = NULL
'а' < 'б'
'а' < 'аа'
'аб' < 'ба'
'а' > ','
'а' < 'b'
'а' < 'bb'
'а' < 'ab'
'а' > NULL
'y' < 'k'
+2 -3
View File
@@ -1,9 +1,8 @@
--TEST--
create() icu >= 4.8 && icu < 53.1
create() icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU >= 4.8'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') >= 0) die('skip for ICU < 53.1'); ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
--FILE--
<?php
-82
View File
@@ -1,82 +0,0 @@
--TEST--
create() icu >= 53.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
--FILE--
<?php
/*
* Try creating collator with different locales
* with Procedural and Object methods.
*/
function ut_main()
{
$res_str = '';
$locales = array(
'EN-US-ODESSA',
'UK_UA_ODESSA',
'uk-ua_CALIFORNIA@currency=;currency=GRN',
'',
'root',
'uk@currency=EURO',
'1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
);
foreach( $locales as $locale )
{
// Create Collator with the current locale.
$coll = ut_coll_create( $locale );
if( !is_object($coll) )
{
$res_str .= "Error creating collator with '$locale' locale: " .
intl_get_error_message() . "\n";
continue;
}
// Get the requested, valid and actual locales.
$vloc = ut_coll_get_locale( $coll, Locale::VALID_LOCALE );
$aloc = ut_coll_get_locale( $coll, Locale::ACTUAL_LOCALE );
// Show them.
$res_str .= "Locale: '$locale'\n" .
" ULOC_REQUESTED_LOCALE = '$locale'\n" .
" ULOC_VALID_LOCALE = '$vloc'\n" .
" ULOC_ACTUAL_LOCALE = '$aloc'\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECTF--
Locale: 'EN-US-ODESSA'
ULOC_REQUESTED_LOCALE = 'EN-US-ODESSA'
ULOC_VALID_LOCALE = 'en_US'
ULOC_ACTUAL_LOCALE = 'root'
Locale: 'UK_UA_ODESSA'
ULOC_REQUESTED_LOCALE = 'UK_UA_ODESSA'
ULOC_VALID_LOCALE = 'uk'
ULOC_ACTUAL_LOCALE = 'uk'
Locale: 'uk-ua_CALIFORNIA@currency=;currency=GRN'
ULOC_REQUESTED_LOCALE = 'uk-ua_CALIFORNIA@currency=;currency=GRN'
ULOC_VALID_LOCALE = 'root'
ULOC_ACTUAL_LOCALE = 'root'
Locale: ''
ULOC_REQUESTED_LOCALE = ''
ULOC_VALID_LOCALE = '%s'
ULOC_ACTUAL_LOCALE = '%s'
Locale: 'root'
ULOC_REQUESTED_LOCALE = 'root'
ULOC_VALID_LOCALE = 'root'
ULOC_ACTUAL_LOCALE = 'root'
Locale: 'uk@currency=EURO'
ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
ULOC_VALID_LOCALE = 'uk'
ULOC_ACTUAL_LOCALE = 'uk'
Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 80 characters: U_ILLEGAL_ARGUMENT_ERROR
+1 -3
View File
@@ -3,8 +3,6 @@ collator_get_sort_key()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
<?php /* XXX Obviously it fails somewhere between >= 4.8 and < 51.2 */
if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
@@ -97,4 +95,4 @@ key: 5c0a161801070107
source: жжж
key: 5c3a3a3a01070107
source: эюя
key: 5d3b3f4501070107
key: 5d3b3f4501070107
@@ -1,99 +0,0 @@
--TEST--
collator_get_sort_key()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') >= 0) die('skip for ICU < 53.1'); ?>
--FILE--
<?php
/*
* Get sort keys using various locales
*/
function sort_arrays( $locale, $data )
{
$res_str = '';
$coll = ut_coll_create( $locale );
foreach($data as $value) {
$res_val = ut_coll_get_sort_key( $coll, $value );
$res_str .= "source: ".$value."\n".
"key: ".bin2hex($res_val)."\n";
}
return $res_str;
}
function ut_main()
{
$res_str = '';
// Regular strings keys
$test_params = array(
'abc', 'abd', 'aaa',
'аа', 'а', 'z',
'', null , '3',
'y' , 'i' , 'k'
);
$res_str .= sort_arrays( 'en_US', $test_params );
// Sort a non-ASCII array using ru_RU locale.
$test_params = array(
'абг', 'абв', 'жжж', 'эюя'
);
$res_str .= sort_arrays( 'ru_RU', $test_params );
// Sort an array using Lithuanian locale.
$res_str .= sort_arrays( 'lt_LT', $test_params );
return $res_str . "\n";
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
source: abc
key: 27292b01070107
source: abd
key: 27292d01070107
source: aaa
key: 27272701070107
source: аа
key: 5c0a0a01060106
source: а
key: 5c0a01050105
source: z
key: 5901050105
source:
key: 0101
source:
key: 0101
source: 3
key: 1801050105
source: y
key: 5701050105
source: i
key: 3701050105
source: k
key: 3b01050105
source: абг
key: 260a161a01070107
source: абв
key: 260a161801070107
source: жжж
key: 263a3a3a01070107
source: эюя
key: 273b3f4501070107
source: абг
key: 5c0a161a01070107
source: абв
key: 5c0a161801070107
source: жжж
key: 5c3a3a3a01070107
source: эюя
key: 5d3b3f4501070107
@@ -1,98 +0,0 @@
--TEST--
collator_get_sort_key()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
--FILE--
<?php
/*
* Get sort keys using various locales
*/
function sort_arrays( $locale, $data )
{
$res_str = '';
$coll = ut_coll_create( $locale );
foreach($data as $value) {
$res_val = ut_coll_get_sort_key( $coll, $value );
$res_str .= "source: ".$value."\n".
"key: ".bin2hex($res_val)."\n";
}
return $res_str;
}
function ut_main()
{
$res_str = '';
// Regular strings keys
$test_params = array(
'abc', 'abd', 'aaa',
'аа', 'а', 'z',
'', null , '3',
'y' , 'i' , 'k'
);
$res_str .= sort_arrays( 'en_US', $test_params );
// Sort a non-ASCII array using ru_RU locale.
$test_params = array(
'абг', 'абв', 'жжж', 'эюя'
);
$res_str .= sort_arrays( 'ru_RU', $test_params );
// Sort an array using Lithuanian locale.
$res_str .= sort_arrays( 'lt_LT', $test_params );
return $res_str . "\n";
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
source: abc
key: 292b2d01070107
source: abd
key: 292b2f01070107
source: aaa
key: 29292901070107
source: аа
key: 5e090901060106
source: а
key: 5e0901050105
source: z
key: 5b01050105
source:
key: 0101
source:
key: 0101
source: 3
key: 1a01050105
source: y
key: 5901050105
source: i
key: 3901050105
source: k
key: 3d01050105
source: абг
key: 2809131701070107
source: абв
key: 2809131501070107
source: жжж
key: 2833333301070107
source: эюя
key: 28cdd1d501070107
source: абг
key: 5e09131701070107
source: абв
key: 5e09131501070107
source: жжж
key: 5e33333301070107
source: эюя
key: 5ecdd1d501070107
-1
View File
@@ -2,7 +2,6 @@
sort()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
-248
View File
@@ -1,248 +0,0 @@
--TEST--
sort()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Sort arrays using various locales.
*/
$test_num = 1;
/*
* Sort arrays in the given list using specified locale.
*/
function sort_arrays( $locale, $arrays, $sort_flag = Collator::SORT_REGULAR )
{
$res_str = '';
$coll = ut_coll_create( $locale );
foreach( $arrays as $array )
{
// Sort array values
$res_val = ut_coll_sort( $coll, $array, $sort_flag );
// Concatenate the sorted array and function result
// with output string.
$res_dump = "\n" . dump( $array ) .
"\n Result: " . dump( $res_val );
// Preppend test signature to output string
$md5 = md5( $res_dump );
global $test_num;
$res_str .= "\n\n".
"Test $test_num.$md5:" .
$res_dump;
++$test_num;
}
return $res_str;
}
function ut_main()
{
global $test_num;
$test_num = 1;
$res_str = '';
// Sort an array in SORT_REGULAR mode using en_US locale.
$test_params = array(
array( 'abc', 'abd', 'aaa' ),
array( 'm' , '1' , '_' ),
array( 'a' , 'aaa', 'aa' ),
array( 'ba' , 'b' , 'ab' ),
array( 'e' , 'c' , 'a' ),
array( '100', '25' , '36' ),
array( 5 , '30' , 2 ),
array( 'd' , '' , ' a' ),
array( 'd ' , 'f ' , ' a' ),
array( 'a' , null , '3' ),
array( 'y' , 'k' , 'i' )
);
$res_str .= sort_arrays( 'en_US', $test_params );
$test_params = array(
array( '100', '25' , '36' ),
array( 5 , '30' , 2 ),
array( 'd' , '' , ' a' ),
array( 'y' , 'k' , 'i' )
);
// Sort in en_US locale with SORT_STRING flag
$res_str .= sort_arrays( 'en_US', $test_params, Collator::SORT_STRING );
// Sort a non-ASCII array using ru_RU locale.
$test_params = array(
array( 'абг', 'абв', 'ааа', 'abc' ),
array( 'аа', 'ааа' , 'а' )
);
$res_str .= sort_arrays( 'ru_RU', $test_params );
// Sort an array using Lithuanian locale.
$test_params = array(
array( 'y' , 'k' , 'i' )
);
$res_str .= sort_arrays( 'lt_LT', $test_params );
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
Test 1.e8f1cd28133d79ecd660002f1c660d0e:
array (
0 => 'aaa',
1 => 'abc',
2 => 'abd',
)
Result: true
Test 2.c2ded12173dd2996927378cae37eb275:
array (
0 => '_',
1 => '1',
2 => 'm',
)
Result: true
Test 3.54071c968d71cb98c5d379145f8d7d38:
array (
0 => 'a',
1 => 'aa',
2 => 'aaa',
)
Result: true
Test 4.19abe63d6f6dfef65b0e3c9ab4826b07:
array (
0 => 'ab',
1 => 'b',
2 => 'ba',
)
Result: true
Test 5.9a8dc0a9bc771368c2f1fc3d02754610:
array (
0 => 'a',
1 => 'c',
2 => 'e',
)
Result: true
Test 6.ab530b060e5e54a65bfb8b9f8fc61870:
array (
0 => '25',
1 => '36',
2 => '100',
)
Result: true
Test 7.0718dd838509017bded2ed307a6e785f:
array (
0 => 2,
1 => 5,
2 => '30',
)
Result: true
Test 8.923d65739c5219c634616ffd100a50e4:
array (
0 => '',
1 => ' a',
2 => 'd',
)
Result: true
Test 9.289bc2f28e87d3201ec9d7e8477ae1b0:
array (
0 => ' a',
1 => 'd ',
2 => 'f ',
)
Result: true
Test 10.de0fd958484f2377a645835d7fbcf124:
array (
0 => NULL,
1 => '3',
2 => 'a',
)
Result: true
Test 11.dd2b8f0adb37c45d528cad1a0cc0f361:
array (
0 => 'i',
1 => 'k',
2 => 'y',
)
Result: true
Test 12.1e6b4d6f7df9d4580317634ea46d8208:
array (
0 => '100',
1 => '25',
2 => '36',
)
Result: true
Test 13.cec115dc9850b98dfbdf102efa09e61b:
array (
0 => 2,
1 => '30',
2 => 5,
)
Result: true
Test 14.923d65739c5219c634616ffd100a50e4:
array (
0 => '',
1 => ' a',
2 => 'd',
)
Result: true
Test 15.dd2b8f0adb37c45d528cad1a0cc0f361:
array (
0 => 'i',
1 => 'k',
2 => 'y',
)
Result: true
Test 16.49056308afb2b800363c5baa735ed247:
array (
0 => 'ааа',
1 => 'абв',
2 => 'абг',
3 => 'abc',
)
Result: true
Test 17.91480b10473a0c96a4cd6d88c23c577a:
array (
0 => 'а',
1 => 'аа',
2 => 'ааа',
)
Result: true
Test 18.fdd3fe3981476039164aa000bf9177f2:
array (
0 => 'i',
1 => 'y',
2 => 'k',
)
Result: true
@@ -2,7 +2,6 @@
sort_with_sort_keys()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
@@ -1,190 +0,0 @@
--TEST--
sort_with_sort_keys()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Sort arrays using various locales.
*/
$test_num = 1;
/*
* Sort arrays in the given list using specified locale.
*/
function sort_arrays( $locale, $arrays )
{
$res_str = '';
$coll = ut_coll_create( $locale );
foreach( $arrays as $array )
{
// Sort array values
$res_val = ut_coll_sort_with_sort_keys( $coll, $array );
// Concatenate the sorted array and function result
// with output string.
$res_dump = "\n" . dump( $array ) .
"\n Result: " . dump( $res_val );
// Preppend test signature to output string
$md5 = md5( $res_dump );
global $test_num;
$res_str .= "\n\n".
"Test $test_num.$md5:" .
$res_dump;
++$test_num;
}
return $res_str;
}
function ut_main()
{
global $test_num;
$test_num = 1;
$res_str = '';
// Sort an array in SORT_REGULAR mode using en_US locale.
$test_params = array(
array( 'abc', 'abd', 'aaa' ),
array( 'm' , '1' , '_' ),
array( 'a' , 'aaa', 'aa' ),
array( 'ba' , 'b' , 'ab' ),
array( 'e' , 'c' , 'a' ),
array( 'd' , '' , ' a' ),
array( 'd ' , 'f ' , ' a' ),
array( 'a' , null , '3' ),
array( 'y' , 'i' , 'k' )
);
$res_str .= sort_arrays( 'en_US', $test_params );
// Sort a non-ASCII array using ru_RU locale.
$test_params = array(
array( 'абг', 'абв', 'ааа', 'abc' ),
array( 'аа', 'ааа', 'а' )
);
$res_str .= sort_arrays( 'ru_RU', $test_params );
// Array with data for sorting.
$test_params = array(
array( 'y' , 'i' , 'k' )
);
// Sort an array using Lithuanian locale.
$res_str .= sort_arrays( 'lt_LT', $test_params );
return $res_str . "\n";
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
Test 1.e8f1cd28133d79ecd660002f1c660d0e:
array (
0 => 'aaa',
1 => 'abc',
2 => 'abd',
)
Result: true
Test 2.c2ded12173dd2996927378cae37eb275:
array (
0 => '_',
1 => '1',
2 => 'm',
)
Result: true
Test 3.54071c968d71cb98c5d379145f8d7d38:
array (
0 => 'a',
1 => 'aa',
2 => 'aaa',
)
Result: true
Test 4.19abe63d6f6dfef65b0e3c9ab4826b07:
array (
0 => 'ab',
1 => 'b',
2 => 'ba',
)
Result: true
Test 5.9a8dc0a9bc771368c2f1fc3d02754610:
array (
0 => 'a',
1 => 'c',
2 => 'e',
)
Result: true
Test 6.923d65739c5219c634616ffd100a50e4:
array (
0 => '',
1 => ' a',
2 => 'd',
)
Result: true
Test 7.289bc2f28e87d3201ec9d7e8477ae1b0:
array (
0 => ' a',
1 => 'd ',
2 => 'f ',
)
Result: true
Test 8.de0fd958484f2377a645835d7fbcf124:
array (
0 => NULL,
1 => '3',
2 => 'a',
)
Result: true
Test 9.dd2b8f0adb37c45d528cad1a0cc0f361:
array (
0 => 'i',
1 => 'k',
2 => 'y',
)
Result: true
Test 10.49056308afb2b800363c5baa735ed247:
array (
0 => 'ааа',
1 => 'абв',
2 => 'абг',
3 => 'abc',
)
Result: true
Test 11.91480b10473a0c96a4cd6d88c23c577a:
array (
0 => 'а',
1 => 'аа',
2 => 'ааа',
)
Result: true
Test 12.fdd3fe3981476039164aa000bf9177f2:
array (
0 => 'i',
1 => 'y',
2 => 'k',
)
Result: true
@@ -1,45 +0,0 @@
--TEST--
IntlDateFormatter, calendars and time zone
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
$fmt1 = new IntlDateFormatter('en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'GMT+05:12',
IntlDateFormatter::TRADITIONAL);
$fmt2 = new IntlDateFormatter('en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'GMT+05:12',
IntlDateFormatter::GREGORIAN);
$fmt3 = new IntlDateFormatter('en_US@calendar=hebrew',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'GMT+05:12',
IntlDateFormatter::TRADITIONAL);
var_dump($fmt1->format(strtotime('2012-01-01 00:00:00 +0000')));
var_dump($fmt2->format(strtotime('2012-01-01 00:00:00 +0000')));
var_dump($fmt3->format(strtotime('2012-01-01 00:00:00 +0000')));
new IntlDateFormatter('en_US@calendar=hebrew',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'GMT+05:12',
-1);
?>
==DONE==
--EXPECTF--
string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12"
string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12"
string(48) "Sunday, Tevet 6, 5772 AM at 5:12:00 AM GMT+05:12"
Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %sdateformat_calendars_variant2.php on line %d
==DONE==
@@ -1,85 +0,0 @@
--TEST--
datefmt_set_timezone_id_code() icu >= 4.8
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("error_reporting", ~E_DEPRECATED);
/*
* Test for the datefmt_set_timezone_id function
*/
function ut_main()
{
$timezone_id_arr = array (
'America/New_York',
'America/Los_Angeles',
'America/Chicago',
'CN'
);
$timestamp_entry = 0;
$res_str = '';
$fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'US/Pacific' , IntlDateFormatter::GREGORIAN );
$timezone_id = ut_datefmt_get_timezone_id( $fmt );
$res_str .= "\nAfter creation of the dateformatter : timezone_id= $timezone_id\n";
foreach( $timezone_id_arr as $timezone_id_entry )
{
$res_str .= "-----------";
$res_str .= "\nTrying to set timezone_id= $timezone_id_entry";
ut_datefmt_set_timezone_id( $fmt , $timezone_id_entry );
$timezone_id = ut_datefmt_get_timezone_id( $fmt );
$res_str .= "\nAfter call to set_timezone_id : timezone_id= $timezone_id";
$formatted = ut_datefmt_format( $fmt, 0);
$res_str .= "\nFormatting timestamp=0 resulted in $formatted";
$formatted = ut_datefmt_format( $fmt, 3600);
$res_str .= "\nFormatting timestamp=3600 resulted in $formatted";
$res_str .= "\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
--EXPECTF--
Warning: IntlDateFormatter::setTimeZoneId(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d
Warning: datefmt_set_timezone_id(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d
After creation of the dateformatter : timezone_id= US/Pacific
-----------
Trying to set timezone_id= America/New_York
After call to set_timezone_id : timezone_id= America/New_York
Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Eastern Standard Time
Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 8:00:00 PM Eastern Standard Time
-----------
Trying to set timezone_id= America/Los_Angeles
After call to set_timezone_id : timezone_id= America/Los_Angeles
Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 4:00:00 PM Pacific Standard Time
Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 5:00:00 PM Pacific Standard Time
-----------
Trying to set timezone_id= America/Chicago
After call to set_timezone_id : timezone_id= America/Chicago
Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time
Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time
-----------
Trying to set timezone_id= CN
After call to set_timezone_id : timezone_id= America/Chicago
Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time
Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time
+1 -1
View File
@@ -2,7 +2,7 @@
numfmt_format() icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
--FILE--
<?php
-131
View File
@@ -1,131 +0,0 @@
--TEST--
numfmt_format() icu >= 52.1 && icu < 53.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '52.1') < 0) print 'skip for ICU >= 52.1'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') >= 0) die('skip for ICU < 53.1'); ?>
--FILE--
<?php
/*
* Format a number using misc locales/patterns.
*/
/*
* TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
* currency and percent formatting.
*/
function ut_main()
{
$styles = array(
NumberFormatter::PATTERN_DECIMAL => '##.#####################',
NumberFormatter::DECIMAL => '',
NumberFormatter::CURRENCY => '',
NumberFormatter::PERCENT => '',
NumberFormatter::SCIENTIFIC => '',
NumberFormatter::SPELLOUT => '@@@@@@@',
NumberFormatter::ORDINAL => '',
NumberFormatter::DURATION => '',
NumberFormatter::PATTERN_RULEBASED => '#####.###',
1234999, // bad one
);
$integer = array(
NumberFormatter::ORDINAL => '',
NumberFormatter::DURATION => '',
);
$locales = array(
'en_US',
'ru_UA',
'de',
'fr',
'en_UK'
);
$str_res = '';
$number = 1234567.891234567890000;
foreach( $locales as $locale )
{
$str_res .= "\nLocale is: $locale\n";
foreach( $styles as $style => $pattern )
{
$fmt = ut_nfmt_create( $locale, $style, $pattern );
if(!$fmt) {
$str_res .= "Bad formatter!\n";
continue;
}
$str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
}
}
return $str_res;
}
include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
--EXPECTREGEX--
Locale is: en_US
'1234567.89123457'
'1,234,567.891'
'\$1,234,567.89'
'123,456,789%'
'1.23456789123457E6'
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
'1,234,567(th|ᵗʰ)'
'342:56:07'
'#####.###'
Bad formatter!
Locale is: ru_UA
'1234567,89123457'
'1 234 567,891'
'1 234 567,89 ?(грн\.|₴)'
'123 456 789 ?%'
'1,23456789123457E6'
'один миллион двести тридцать четыре тысяч пятьсот шестьдесят семь запятая восемь девять один два три четыре пять семь'
'1 234 567.?'
'1 234 567'
'#####.###'
Bad formatter!
Locale is: de
'1234567,89123457'
'1.234.567,891'
'(¤ )?1.234.567,89( ¤)?'
'123\.456\.789 %'
'1,23456789123457E6'
'eine Million zwei­hundert­vier­und­dreißig­tausend­fünf­hundert­sieben­und­sechzig Komma acht neun eins zwei drei vier fünf sieben'
'1.234.567.?'
'1.234.567'
'#####.###'
Bad formatter!
Locale is: fr
'1234567,89123457'
'1 234 567,891'
'1 234 567,89 ¤'
'123 456 789 ?%'
'1,23456789123457E6'
'un million deux cent trente-quatre mille cinq cent soixante-sept virgule huit neuf un deux trois quatre cinq sept'
'1 234 567e'
'1 234 567'
'#####.###'
Bad formatter!
Locale is: en_UK
'1234567.89123457'
'1,234,567.891'
'¤1,234,567.89'
'123,456,789%'
'1.23456789123457E6'
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
'1,234,567(th|ᵗʰ)'
'342:56:07'
'#####.###'
Bad formatter!
-130
View File
@@ -1,130 +0,0 @@
--TEST--
numfmt_format() icu >= 53.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
--FILE--
<?php
/*
* Format a number using misc locales/patterns.
*/
/*
* TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
* currency and percent formatting.
*/
function ut_main()
{
$styles = array(
NumberFormatter::PATTERN_DECIMAL => '##.#####################',
NumberFormatter::DECIMAL => '',
NumberFormatter::CURRENCY => '',
NumberFormatter::PERCENT => '',
NumberFormatter::SCIENTIFIC => '',
NumberFormatter::SPELLOUT => '@@@@@@@',
NumberFormatter::ORDINAL => '',
NumberFormatter::DURATION => '',
NumberFormatter::PATTERN_RULEBASED => '#####.###',
1234999, // bad one
);
$integer = array(
NumberFormatter::ORDINAL => '',
NumberFormatter::DURATION => '',
);
$locales = array(
'en_US',
'ru_UA',
'de',
'fr',
'en_UK'
);
$str_res = '';
$number = 1234567.891234567890000;
foreach( $locales as $locale )
{
$str_res .= "\nLocale is: $locale\n";
foreach( $styles as $style => $pattern )
{
$fmt = ut_nfmt_create( $locale, $style, $pattern );
if(!$fmt) {
$str_res .= "Bad formatter!\n";
continue;
}
$str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
}
}
return $str_res;
}
include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
--EXPECTREGEX--
Locale is: en_US
'1234567.89123457'
'1,234,567.891'
'\$1,234,567.89'
'123,456,789%'
'1.23456789123457E6'
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
'1,234,567(th|ᵗʰ)'
'342:56:07'
'#####.###'
'USD1,234,567.89'
Locale is: ru_UA
'1234567,89123457'
'1 234 567,891'
'1 234 567,89 ?(грн\.|₴)'
'123 456 789 ?%'
'1,23456789123457E6'
'один миллион двести тридцать четыре тысяч пятьсот шестьдесят семь запятая восемь девять один два три четыре пять семь'
'1 234 567.?'
'1 234 567'
'#####.###'
'1 234 567,89 UAH'
Locale is: de
'1234567,89123457'
'1.234.567,891'
'(¤ )?1.234.567,89( ¤)?'
'123\.456\.789 %'
'1,23456789123457E6'
'eine Million zwei­hundert­vier­und­dreißig­tausend­fünf­hundert­sieben­und­sechzig Komma acht neun eins zwei drei vier fünf sieben'
'1.234.567.?'
'1.234.567'
'#####.###'
'1.234.567,89 ¤¤'
Locale is: fr
'1234567,89123457'
'1 234 567,891'
'1 234 567,89 ¤'
'123 456 789 ?%'
'1,23456789123457E6'
'un million deux cent trente-quatre mille cinq cent soixante-sept virgule huit neuf un deux trois quatre cinq sept'
'1 234 567e'
'1 234 567'
'#####.###'
'1 234 567,89 ¤¤'
Locale is: en_UK
'1234567.89123457'
'1,234,567.891'
'¤1,234,567.89'
'123,456,789%'
'1.23456789123457E6'
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
'1,234,567(th|ᵗʰ)'
'342:56:07'
'#####.###'
'¤¤1,234,567.89'
-1
View File
@@ -2,7 +2,6 @@
numfmt_get_locale()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
@@ -1,50 +0,0 @@
--TEST--
numfmt_get_locale()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Get locale.
*/
function ut_main()
{
$locales = array(
'en_UK',
'en_US@California',
'fr_CA',
);
$loc_types = array(
Locale::ACTUAL_LOCALE => 'actual',
Locale::VALID_LOCALE => 'valid',
);
$res_str = '';
foreach( $locales as $locale )
{
$fmt = ut_nfmt_create( $locale, NumberFormatter::DECIMAL );
$res_str .= "$locale: ";
foreach( $loc_types as $loc_type => $loc_type_name )
$res_str .= sprintf( " %s=%s",
$loc_type_name,
dump( ut_nfmt_get_locale( $fmt, $loc_type ) ) );
$res_str .= "\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
--EXPECT--
en_UK: actual='en' valid='en'
en_US@California: actual='en' valid='en'
fr_CA: actual='fr' valid='fr_CA'
+1 -2
View File
@@ -1,9 +1,8 @@
--TEST--
locale_filter_matches.phpt() icu >= 4.8 && icu < 51.2
locale_filter_matches.phpt() icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
-366
View File
@@ -1,366 +0,0 @@
--TEST--
locale_filter_matches.phpt() ICU >= 51.2
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Try parsing different Locales
* with Procedural and Object methods.
*/
function ut_main()
{
$loc_ranges = array(
'de-de',
'sl_IT',
'sl_IT_Nedis',
'jbo',
'art-lojban',
'sl_IT'
);
$lang_tags = array(
'de-DEVA',
'de-DE-1996',
'de-DE',
'zh_Hans',
'de-CH-1996',
'sl_IT',
'sl_IT_nedis-a-kirti-x-xyz',
'sl_IT_rozaj',
'sl_IT_NEDIS_ROJAZ_1901',
'i-enochian',
'sgn-CH-de',
'art-lojban',
'i-lux',
'art-lojban',
'jbo',
'en_sl_IT'
);
$res_str = '';
$isCanonical = false;
foreach($loc_ranges as $loc_range){
foreach($lang_tags as $lang_tag){
$res_str .="--------------\n";
$result= ut_loc_locale_filter_matches( $lang_tag , $loc_range , $isCanonical);
$res_str .= "loc_range:$loc_range matches lang_tag $lang_tag ? ";
if( $result){
$res_str .= "YES\n";
}else{
$res_str .= "NO\n";
}
//canonicalized version
$result= ut_loc_locale_filter_matches( $lang_tag , $loc_range , !($isCanonical));
$can_loc_range = ut_loc_canonicalize($loc_range);
$can_lang_tag = ut_loc_canonicalize($lang_tag);
$res_str .= "loc_range:$can_loc_range canonically matches lang_tag $can_lang_tag ? ";
if( $result){
$res_str .= "YES\n";
}else{
$res_str .= "NO\n";
}
}
}
$res_str .= "\n";
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
--------------
loc_range:de-de matches lang_tag de-DEVA ? NO
loc_range:de_DE canonically matches lang_tag de_Deva ? NO
--------------
loc_range:de-de matches lang_tag de-DE-1996 ? YES
loc_range:de_DE canonically matches lang_tag de_DE_1996 ? YES
--------------
loc_range:de-de matches lang_tag de-DE ? YES
loc_range:de_DE canonically matches lang_tag de_DE ? YES
--------------
loc_range:de-de matches lang_tag zh_Hans ? NO
loc_range:de_DE canonically matches lang_tag zh_Hans ? NO
--------------
loc_range:de-de matches lang_tag de-CH-1996 ? NO
loc_range:de_DE canonically matches lang_tag de_CH_1996 ? NO
--------------
loc_range:de-de matches lang_tag sl_IT ? NO
loc_range:de_DE canonically matches lang_tag sl_IT ? NO
--------------
loc_range:de-de matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO
loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO
--------------
loc_range:de-de matches lang_tag sl_IT_rozaj ? NO
loc_range:de_DE canonically matches lang_tag sl_IT_ROZAJ ? NO
--------------
loc_range:de-de matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
--------------
loc_range:de-de matches lang_tag i-enochian ? NO
loc_range:de_DE canonically matches lang_tag @x=i-enochian ? NO
--------------
loc_range:de-de matches lang_tag sgn-CH-de ? NO
loc_range:de_DE canonically matches lang_tag sgn_CH_DE ? NO
--------------
loc_range:de-de matches lang_tag art-lojban ? NO
loc_range:de_DE canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:de-de matches lang_tag i-lux ? NO
loc_range:de_DE canonically matches lang_tag lb ? NO
--------------
loc_range:de-de matches lang_tag art-lojban ? NO
loc_range:de_DE canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:de-de matches lang_tag jbo ? NO
loc_range:de_DE canonically matches lang_tag jbo ? NO
--------------
loc_range:de-de matches lang_tag en_sl_IT ? NO
loc_range:de_DE canonically matches lang_tag en_SL_IT ? NO
--------------
loc_range:sl_IT matches lang_tag de-DEVA ? NO
loc_range:sl_IT canonically matches lang_tag de_Deva ? NO
--------------
loc_range:sl_IT matches lang_tag de-DE-1996 ? NO
loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO
--------------
loc_range:sl_IT matches lang_tag de-DE ? NO
loc_range:sl_IT canonically matches lang_tag de_DE ? NO
--------------
loc_range:sl_IT matches lang_tag zh_Hans ? NO
loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO
--------------
loc_range:sl_IT matches lang_tag de-CH-1996 ? NO
loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO
--------------
loc_range:sl_IT matches lang_tag sl_IT ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT ? YES
--------------
loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES
--------------
loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES
--------------
loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
--------------
loc_range:sl_IT matches lang_tag i-enochian ? NO
loc_range:sl_IT canonically matches lang_tag @x=i-enochian ? NO
--------------
loc_range:sl_IT matches lang_tag sgn-CH-de ? NO
loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO
--------------
loc_range:sl_IT matches lang_tag art-lojban ? NO
loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:sl_IT matches lang_tag i-lux ? NO
loc_range:sl_IT canonically matches lang_tag lb ? NO
--------------
loc_range:sl_IT matches lang_tag art-lojban ? NO
loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:sl_IT matches lang_tag jbo ? NO
loc_range:sl_IT canonically matches lang_tag jbo ? NO
--------------
loc_range:sl_IT matches lang_tag en_sl_IT ? NO
loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag de-DEVA ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag de_Deva ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag de-DE-1996 ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE_1996 ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag de-DE ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag zh_Hans ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag zh_Hans ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag de-CH-1996 ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag de_CH_1996 ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag sl_IT ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES
loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES
--------------
loc_range:sl_IT_Nedis matches lang_tag sl_IT_rozaj ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_ROZAJ ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
--------------
loc_range:sl_IT_Nedis matches lang_tag i-enochian ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag @x=i-enochian ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag sgn-CH-de ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag sgn_CH_DE ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag i-lux ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag lb ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag jbo ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO
--------------
loc_range:sl_IT_Nedis matches lang_tag en_sl_IT ? NO
loc_range:sl_IT_NEDIS canonically matches lang_tag en_SL_IT ? NO
--------------
loc_range:jbo matches lang_tag de-DEVA ? NO
loc_range:jbo canonically matches lang_tag de_Deva ? NO
--------------
loc_range:jbo matches lang_tag de-DE-1996 ? NO
loc_range:jbo canonically matches lang_tag de_DE_1996 ? NO
--------------
loc_range:jbo matches lang_tag de-DE ? NO
loc_range:jbo canonically matches lang_tag de_DE ? NO
--------------
loc_range:jbo matches lang_tag zh_Hans ? NO
loc_range:jbo canonically matches lang_tag zh_Hans ? NO
--------------
loc_range:jbo matches lang_tag de-CH-1996 ? NO
loc_range:jbo canonically matches lang_tag de_CH_1996 ? NO
--------------
loc_range:jbo matches lang_tag sl_IT ? NO
loc_range:jbo canonically matches lang_tag sl_IT ? NO
--------------
loc_range:jbo matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO
loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO
--------------
loc_range:jbo matches lang_tag sl_IT_rozaj ? NO
loc_range:jbo canonically matches lang_tag sl_IT_ROZAJ ? NO
--------------
loc_range:jbo matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
--------------
loc_range:jbo matches lang_tag i-enochian ? NO
loc_range:jbo canonically matches lang_tag @x=i-enochian ? NO
--------------
loc_range:jbo matches lang_tag sgn-CH-de ? NO
loc_range:jbo canonically matches lang_tag sgn_CH_DE ? NO
--------------
loc_range:jbo matches lang_tag art-lojban ? NO
loc_range:jbo canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:jbo matches lang_tag i-lux ? NO
loc_range:jbo canonically matches lang_tag lb ? NO
--------------
loc_range:jbo matches lang_tag art-lojban ? NO
loc_range:jbo canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:jbo matches lang_tag jbo ? YES
loc_range:jbo canonically matches lang_tag jbo ? YES
--------------
loc_range:jbo matches lang_tag en_sl_IT ? NO
loc_range:jbo canonically matches lang_tag en_SL_IT ? NO
--------------
loc_range:art-lojban matches lang_tag de-DEVA ? NO
loc_range:art__LOJBAN canonically matches lang_tag de_Deva ? NO
--------------
loc_range:art-lojban matches lang_tag de-DE-1996 ? NO
loc_range:art__LOJBAN canonically matches lang_tag de_DE_1996 ? NO
--------------
loc_range:art-lojban matches lang_tag de-DE ? NO
loc_range:art__LOJBAN canonically matches lang_tag de_DE ? NO
--------------
loc_range:art-lojban matches lang_tag zh_Hans ? NO
loc_range:art__LOJBAN canonically matches lang_tag zh_Hans ? NO
--------------
loc_range:art-lojban matches lang_tag de-CH-1996 ? NO
loc_range:art__LOJBAN canonically matches lang_tag de_CH_1996 ? NO
--------------
loc_range:art-lojban matches lang_tag sl_IT ? NO
loc_range:art__LOJBAN canonically matches lang_tag sl_IT ? NO
--------------
loc_range:art-lojban matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO
loc_range:art__LOJBAN canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO
--------------
loc_range:art-lojban matches lang_tag sl_IT_rozaj ? NO
loc_range:art__LOJBAN canonically matches lang_tag sl_IT_ROZAJ ? NO
--------------
loc_range:art-lojban matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
loc_range:art__LOJBAN canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
--------------
loc_range:art-lojban matches lang_tag i-enochian ? NO
loc_range:art__LOJBAN canonically matches lang_tag @x=i-enochian ? NO
--------------
loc_range:art-lojban matches lang_tag sgn-CH-de ? NO
loc_range:art__LOJBAN canonically matches lang_tag sgn_CH_DE ? NO
--------------
loc_range:art-lojban matches lang_tag art-lojban ? YES
loc_range:art__LOJBAN canonically matches lang_tag art__LOJBAN ? YES
--------------
loc_range:art-lojban matches lang_tag i-lux ? NO
loc_range:art__LOJBAN canonically matches lang_tag lb ? NO
--------------
loc_range:art-lojban matches lang_tag art-lojban ? YES
loc_range:art__LOJBAN canonically matches lang_tag art__LOJBAN ? YES
--------------
loc_range:art-lojban matches lang_tag jbo ? NO
loc_range:art__LOJBAN canonically matches lang_tag jbo ? NO
--------------
loc_range:art-lojban matches lang_tag en_sl_IT ? NO
loc_range:art__LOJBAN canonically matches lang_tag en_SL_IT ? NO
--------------
loc_range:sl_IT matches lang_tag de-DEVA ? NO
loc_range:sl_IT canonically matches lang_tag de_Deva ? NO
--------------
loc_range:sl_IT matches lang_tag de-DE-1996 ? NO
loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO
--------------
loc_range:sl_IT matches lang_tag de-DE ? NO
loc_range:sl_IT canonically matches lang_tag de_DE ? NO
--------------
loc_range:sl_IT matches lang_tag zh_Hans ? NO
loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO
--------------
loc_range:sl_IT matches lang_tag de-CH-1996 ? NO
loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO
--------------
loc_range:sl_IT matches lang_tag sl_IT ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT ? YES
--------------
loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES
--------------
loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES
--------------
loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
--------------
loc_range:sl_IT matches lang_tag i-enochian ? NO
loc_range:sl_IT canonically matches lang_tag @x=i-enochian ? NO
--------------
loc_range:sl_IT matches lang_tag sgn-CH-de ? NO
loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO
--------------
loc_range:sl_IT matches lang_tag art-lojban ? NO
loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:sl_IT matches lang_tag i-lux ? NO
loc_range:sl_IT canonically matches lang_tag lb ? NO
--------------
loc_range:sl_IT matches lang_tag art-lojban ? NO
loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO
--------------
loc_range:sl_IT matches lang_tag jbo ? NO
loc_range:sl_IT canonically matches lang_tag jbo ? NO
--------------
loc_range:sl_IT matches lang_tag en_sl_IT ? NO
loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO
+1 -2
View File
@@ -1,9 +1,8 @@
--TEST--
locale_get_display_name() icu >= 4.8 && icu < 51.2
locale_get_display_name() icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
@@ -1,342 +0,0 @@
--TEST--
locale_get_display_name() icu >= 51.2
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU >= 51.2 and < 52.1'); ?>
--FILE--
<?php
/*
* Try getting the display_name for different locales
* with Procedural and Object methods.
*/
function ut_main()
{
$res_str='';
$disp_locales=array('en','fr','de');
$locales = array(
'sl_IT_nedis_KIRTI',
'sl_IT_nedis-a-kirti-x-xyz',
'sl_IT_rozaj',
'sl_IT_NEDIS_ROJAZ_1901',
'i-enochian',
'zh-hakka',
'zh-wuu',
'i-tay',
'sgn-BE-nl',
'sgn-CH-de',
'sl_IT_rozaj@currency=EUR',
'uk-ua_CALIFORNIA@currency=;currency=GRN',
'root',
'uk@currency=EURO',
'Hindi',
//Simple language subtag
'de',
'fr',
'ja',
'i-enochian', //(example of a grandfathered tag)
//Language subtag plus Script subtag:
'zh-Hant',
'zh-Hans',
'sr-Cyrl',
'sr-Latn',
//Language-Script-Region
'zh-Hans-CN',
'sr-Latn-CS',
//Language-Variant
'sl-rozaj',
'sl-nedis',
//Language-Region-Variant
'de-CH-1901',
'sl-IT-nedis',
//Language-Script-Region-Variant
'sl-Latn-IT-nedis',
//Language-Region:
'de-DE',
'en-US',
'es-419',
//Private use subtags:
'de-CH-x-phonebk',
'az-Arab-x-AZE-derbend',
//Extended language subtags
'zh-min',
'zh-min-nan-Hant-CN',
//Private use registry values
'x-whatever',
'qaa-Qaaa-QM-x-southern',
'sr-Latn-QM',
'sr-Qaaa-CS',
/*Tags that use extensions (examples ONLY: extensions MUST be defined
by revision or update to this document or by RFC): */
'en-US-u-islamCal',
'zh-CN-a-myExt-x-private',
'en-a-myExt-b-another',
//Some Invalid Tags:
'de-419-DE',
'a-DE',
'ar-a-aaa-b-bbb-a-ccc'
);
$res_str = '';
foreach( $locales as $locale )
{
$res_str .= "locale='$locale'\n";
foreach( $disp_locales as $disp_locale )
{
$scr = ut_loc_get_display_name( $locale ,$disp_locale );
$scr = str_replace(array('(', ')'), '#', $scr);
$res_str .= "disp_locale=$disp_locale : display_name=$scr";
$res_str .= "\n";
}
$res_str .= "-----------------\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECTREGEX--
locale='sl_IT_nedis_KIRTI'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_KIRTI#
disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI#
-----------------
locale='sl_IT_nedis-a-kirti-x-xyz'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ#
disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ#
-----------------
locale='sl_IT_rozaj'
disp_locale=en : display_name=Slovenian #Italy, Resian#
disp_locale=fr : display_name=slovène #Italie, dialecte de Resia#
disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch)#
-----------------
locale='sl_IT_NEDIS_ROJAZ_1901'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_ROJAZ_1901#
disp_locale=fr : display_name=slovène #Italie, NEDIS_ROJAZ_1901#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_ROJAZ_1901#
-----------------
locale='i-enochian'
disp_locale=en : display_name=i-enochian #Private-Use=i-enochian#
disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian#
disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian#
-----------------
locale='zh-hakka'
disp_locale=en : display_name=Chinese( #HAKKA#)?
disp_locale=fr : display_name=chinois( #HAKKA#)?
disp_locale=de : display_name=Chinesisch( #HAKKA#)?
-----------------
locale='zh-wuu'
disp_locale=en : display_name=Chinese #WUU#
disp_locale=fr : display_name=chinois #WUU#
disp_locale=de : display_name=Chinesisch #WUU#
-----------------
locale='i-tay'
disp_locale=en : display_name=i-tay
disp_locale=fr : display_name=i-tay
disp_locale=de : display_name=i-tay
-----------------
locale='sgn-BE-nl'
disp_locale=en : display_name=Sign Languages? #Belgium, NL#
disp_locale=fr : display_name=langues? des signes #Belgique, NL#
disp_locale=de : display_name=Gebärdensprache #Belgien, NL#
-----------------
locale='sgn-CH-de'
disp_locale=en : display_name=Sign Languages? #Switzerland, DE#
disp_locale=fr : display_name=langues? des signes #Suisse, DE#
disp_locale=de : display_name=Gebärdensprache #Schweiz, DE#
-----------------
locale='sl_IT_rozaj@currency=EUR'
disp_locale=en : display_name=Slovenian #Italy, Resian, [Cc]urrency=Euro#
disp_locale=fr : display_name=slovène #Italie, dialecte de Resia, [Dd]evise=euro#
disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch), Währung=Euro#
-----------------
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_name=Ukrainian #Ukraine, CALIFORNIA, [Cc]urrency#
disp_locale=fr : display_name=ukrainien #Ukraine, CALIFORNIA, [Dd]evise#
disp_locale=de : display_name=Ukrainisch #Ukraine, CALIFORNIA, Währung#
-----------------
locale='root'
disp_locale=en : display_name=Root
disp_locale=fr : display_name=racine
disp_locale=de : display_name=[Rr]oot
-----------------
locale='uk@currency=EURO'
disp_locale=en : display_name=Ukrainian #[Cc]urrency=EURO#
disp_locale=fr : display_name=ukrainien #[Dd]evise=EURO#
disp_locale=de : display_name=Ukrainisch #Währung=EURO#
-----------------
locale='Hindi'
disp_locale=en : display_name=hindi
disp_locale=fr : display_name=hindi
disp_locale=de : display_name=hindi
-----------------
locale='de'
disp_locale=en : display_name=German
disp_locale=fr : display_name=allemand
disp_locale=de : display_name=Deutsch
-----------------
locale='fr'
disp_locale=en : display_name=French
disp_locale=fr : display_name=français
disp_locale=de : display_name=Französisch
-----------------
locale='ja'
disp_locale=en : display_name=Japanese
disp_locale=fr : display_name=japonais
disp_locale=de : display_name=Japanisch
-----------------
locale='i-enochian'
disp_locale=en : display_name=i-enochian #Private-Use=i-enochian#
disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian#
disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian#
-----------------
locale='zh-Hant'
disp_locale=en : display_name=Chinese #Traditional#
disp_locale=fr : display_name=chinois #traditionnel#
disp_locale=de : display_name=Chinesisch #Traditionell#
-----------------
locale='zh-Hans'
disp_locale=en : display_name=Chinese #Simplified#
disp_locale=fr : display_name=chinois #simplifié#
disp_locale=de : display_name=Chinesisch #Vereinfacht#
-----------------
locale='sr-Cyrl'
disp_locale=en : display_name=Serbian #Cyrillic#
disp_locale=fr : display_name=serbe #cyrillique#
disp_locale=de : display_name=Serbisch #Kyrillisch#
-----------------
locale='sr-Latn'
disp_locale=en : display_name=Serbian #Latin#
disp_locale=fr : display_name=serbe #latin#
disp_locale=de : display_name=Serbisch #Lateinisch#
-----------------
locale='zh-Hans-CN'
disp_locale=en : display_name=Chinese #Simplified, China#
disp_locale=fr : display_name=chinois #simplifié, Chine#
disp_locale=de : display_name=Chinesisch #Vereinfacht, China#
-----------------
locale='sr-Latn-CS'
disp_locale=en : display_name=Serbian #Latin, Serbia#
disp_locale=fr : display_name=serbe #latin, Serbie#
disp_locale=de : display_name=Serbisch #Lateinisch, Serbien#
-----------------
locale='sl-rozaj'
disp_locale=en : display_name=Slovenian #Resian#
disp_locale=fr : display_name=slovène #dialecte de Resia#
disp_locale=de : display_name=Slowenisch( #(ROZAJ|Resianisch)#)?
-----------------
locale='sl-nedis'
disp_locale=en : display_name=Slovenian #Natisone dialect#
disp_locale=fr : display_name=slovène #dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Natisone-Dialekt#
-----------------
locale='de-CH-1901'
disp_locale=en : display_name=German #Switzerland, Traditional German orthography#
disp_locale=fr : display_name=allemand #Suisse, orthographe allemande traditionnelle#
disp_locale=de : display_name=Deutsch #Schweiz, (1901|[aA]lte deutsche Rechtschreibung)#
-----------------
locale='sl-IT-nedis'
disp_locale=en : display_name=Slovenian #Italy, Natisone dialect#
disp_locale=fr : display_name=slovène #Italie, dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Italien, (NEDIS|Natisone-Dialekt)#
-----------------
locale='sl-Latn-IT-nedis'
disp_locale=en : display_name=Slovenian #Latin, Italy, Natisone dialect#
disp_locale=fr : display_name=slovène #latin, Italie, dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Lateinisch, Italien, (NEDIS|Natisone-Dialekt)#
-----------------
locale='de-DE'
disp_locale=en : display_name=German #Germany#
disp_locale=fr : display_name=allemand #Allemagne#
disp_locale=de : display_name=Deutsch #Deutschland#
-----------------
locale='en-US'
disp_locale=en : display_name=English #United States#
disp_locale=fr : display_name=anglais #États-Unis#
disp_locale=de : display_name=Englisch #Vereinigte Staaten#
-----------------
locale='es-419'
disp_locale=en : display_name=Spanish #Latin America#
disp_locale=fr : display_name=espagnol #Amérique latine#
disp_locale=de : display_name=Spanisch #Lateinamerika#
-----------------
locale='de-CH-x-phonebk'
disp_locale=en : display_name=German #Switzerland, Private-Use=phonebk#
disp_locale=fr : display_name=allemand #Suisse, Usage privé=phonebk#
disp_locale=de : display_name=Deutsch #Schweiz, Privatnutzung=phonebk#
-----------------
locale='az-Arab-x-AZE-derbend'
disp_locale=en : display_name=Azerbaijani #Arabic, Private-Use=aze-derbend#
disp_locale=fr : display_name=azéri #arabe, Usage privé=aze-derbend#
disp_locale=de : display_name=Aserbaidschanisch #Arabisch, Privatnutzung=aze-derbend#
-----------------
locale='zh-min'
disp_locale=en : display_name=Chinese #MIN#
disp_locale=fr : display_name=chinois #MIN#
disp_locale=de : display_name=Chinesisch #MIN#
-----------------
locale='zh-min-nan-Hant-CN'
disp_locale=en : display_name=Chinese #MIN, NAN_HANT_CN#
disp_locale=fr : display_name=chinois #MIN, NAN_HANT_CN#
disp_locale=de : display_name=Chinesisch #MIN, NAN_HANT_CN#
-----------------
locale='x-whatever'
disp_locale=en : display_name=x-whatever #Private-Use=whatever#
disp_locale=fr : display_name=x-whatever #Usage privé=whatever#
disp_locale=de : display_name=x-whatever #Privatnutzung=whatever#
-----------------
locale='qaa-Qaaa-QM-x-southern'
disp_locale=en : display_name=qaa #Qaaa, QM, Private-Use=southern#
disp_locale=fr : display_name=qaa #Qaaa, QM, Usage privé=southern#
disp_locale=de : display_name=qaa #Qaaa, QM, Privatnutzung=southern#
-----------------
locale='sr-Latn-QM'
disp_locale=en : display_name=Serbian #Latin, QM#
disp_locale=fr : display_name=serbe #latin, QM#
disp_locale=de : display_name=Serbisch #Lateinisch, QM#
-----------------
locale='sr-Qaaa-CS'
disp_locale=en : display_name=Serbian #Qaaa, Serbia#
disp_locale=fr : display_name=serbe #Qaaa, Serbie#
disp_locale=de : display_name=Serbisch #Qaaa, Serbien#
-----------------
locale='en-US-u-islamCal'
disp_locale=en : display_name=English #United States, attribute=islamcal#
disp_locale=fr : display_name=anglais #États-Unis, attribute=islamcal#
disp_locale=de : display_name=Englisch #Vereinigte Staaten, attribute=islamcal#
-----------------
locale='zh-CN-a-myExt-x-private'
disp_locale=en : display_name=Chinese #China, a=myext, Private-Use=private#
disp_locale=fr : display_name=chinois #Chine, a=myext, Usage privé=private#
disp_locale=de : display_name=Chinesisch #China, a=myext, Privatnutzung=private#
-----------------
locale='en-a-myExt-b-another'
disp_locale=en : display_name=English #a=myext, b=another#
disp_locale=fr : display_name=anglais #a=myext, b=another#
disp_locale=de : display_name=Englisch #a=myext, b=another#
-----------------
locale='de-419-DE'
disp_locale=en : display_name=German #Latin America, DE#
disp_locale=fr : display_name=allemand #Amérique latine, DE#
disp_locale=de : display_name=Deutsch #Lateinamerika, DE#
-----------------
locale='a-DE'
disp_locale=en : display_name=a #Germany#
disp_locale=fr : display_name=a #Allemagne#
disp_locale=de : display_name=a #Deutschland#
-----------------
locale='ar-a-aaa-b-bbb-a-ccc'
disp_locale=en : display_name=Arabic #a=aaa, b=bbb#
disp_locale=fr : display_name=arabe #a=aaa, b=bbb#
disp_locale=de : display_name=Arabisch #a=aaa, b=bbb#
-----------------
@@ -1,343 +0,0 @@
--TEST--
locale_get_display_name() icu >= 52.1 && icu < 53.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') >= 0) die('skip for ICU < 53.1'); ?>
--FILE--
<?php
/*
* Try getting the display_name for different locales
* with Procedural and Object methods.
*/
function ut_main()
{
$res_str='';
$disp_locales=array('en','fr','de');
$locales = array(
'sl_IT_nedis_KIRTI',
'sl_IT_nedis-a-kirti-x-xyz',
'sl_IT_rozaj',
'sl_IT_NEDIS_ROJAZ_1901',
'i-enochian',
'zh-hakka',
'zh-wuu',
'i-tay',
'sgn-BE-nl',
'sgn-CH-de',
'sl_IT_rozaj@currency=EUR',
'uk-ua_CALIFORNIA@currency=;currency=GRN',
'root',
'uk@currency=EURO',
'Hindi',
//Simple language subtag
'de',
'fr',
'ja',
'i-enochian', //(example of a grandfathered tag)
//Language subtag plus Script subtag:
'zh-Hant',
'zh-Hans',
'sr-Cyrl',
'sr-Latn',
//Language-Script-Region
'zh-Hans-CN',
'sr-Latn-CS',
//Language-Variant
'sl-rozaj',
'sl-nedis',
//Language-Region-Variant
'de-CH-1901',
'sl-IT-nedis',
//Language-Script-Region-Variant
'sl-Latn-IT-nedis',
//Language-Region:
'de-DE',
'en-US',
'es-419',
//Private use subtags:
'de-CH-x-phonebk',
'az-Arab-x-AZE-derbend',
//Extended language subtags
'zh-min',
'zh-min-nan-Hant-CN',
//Private use registry values
'x-whatever',
'qaa-Qaaa-QM-x-southern',
'sr-Latn-QM',
'sr-Qaaa-CS',
/*Tags that use extensions (examples ONLY: extensions MUST be defined
by revision or update to this document or by RFC): */
'en-US-u-islamCal',
'zh-CN-a-myExt-x-private',
'en-a-myExt-b-another',
//Some Invalid Tags:
'de-419-DE',
'a-DE',
'ar-a-aaa-b-bbb-a-ccc'
);
$res_str = '';
foreach( $locales as $locale )
{
$res_str .= "locale='$locale'\n";
foreach( $disp_locales as $disp_locale )
{
$scr = ut_loc_get_display_name( $locale ,$disp_locale );
$scr = str_replace(array('(', ')'), '#', $scr);
$res_str .= "disp_locale=$disp_locale : display_name=$scr";
$res_str .= "\n";
}
$res_str .= "-----------------\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECTREGEX--
locale='sl_IT_nedis_KIRTI'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_KIRTI#
disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI#
-----------------
locale='sl_IT_nedis-a-kirti-x-xyz'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ#
disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ#
-----------------
locale='sl_IT_rozaj'
disp_locale=en : display_name=Slovenian #Italy, Resian#
disp_locale=fr : display_name=slovène #Italie, dialecte de Resia#
disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch)#
-----------------
locale='sl_IT_NEDIS_ROJAZ_1901'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_ROJAZ_1901#
disp_locale=fr : display_name=slovène #Italie, NEDIS_ROJAZ_1901#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_ROJAZ_1901#
-----------------
locale='i-enochian'
disp_locale=en : display_name=i-enochian #Private-Use=i-enochian#
disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian#
disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian#
-----------------
locale='zh-hakka'
disp_locale=en : display_name=Chinese( #HAKKA#)?
disp_locale=fr : display_name=chinois( #HAKKA#)?
disp_locale=de : display_name=Chinesisch( #HAKKA#)?
-----------------
locale='zh-wuu'
disp_locale=en : display_name=Chinese #WUU#
disp_locale=fr : display_name=chinois #WUU#
disp_locale=de : display_name=Chinesisch #WUU#
-----------------
locale='i-tay'
disp_locale=en : display_name=i-tay
disp_locale=fr : display_name=i-tay
disp_locale=de : display_name=i-tay
-----------------
locale='sgn-BE-nl'
disp_locale=en : display_name=Sign Languages? #Belgium, NL#
disp_locale=fr : display_name=langues? des signes #Belgique, NL#
disp_locale=de : display_name=Gebärdensprache #Belgien, NL#
-----------------
locale='sgn-CH-de'
disp_locale=en : display_name=Sign Languages? #Switzerland, DE#
disp_locale=fr : display_name=langues? des signes #Suisse, DE#
disp_locale=de : display_name=Gebärdensprache #Schweiz, DE#
-----------------
locale='sl_IT_rozaj@currency=EUR'
disp_locale=en : display_name=Slovenian #Italy, Resian, [Cc]urrency=Euro#
disp_locale=fr : display_name=slovène #Italie, dialecte de Resia, [Dd]evise=euro#
disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch), Währung=Euro#
-----------------
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_name=
disp_locale=fr : display_name=
disp_locale=de : display_name=
-----------------
locale='root'
disp_locale=en : display_name=Root
disp_locale=fr : display_name=racine
disp_locale=de : display_name=[Rr]oot
-----------------
locale='uk@currency=EURO'
disp_locale=en : display_name=Ukrainian #[Cc]urrency=EURO#
disp_locale=fr : display_name=ukrainien #[Dd]evise=EURO#
disp_locale=de : display_name=Ukrainisch #Währung=EURO#
-----------------
locale='Hindi'
disp_locale=en : display_name=hindi
disp_locale=fr : display_name=hindi
disp_locale=de : display_name=hindi
-----------------
locale='de'
disp_locale=en : display_name=German
disp_locale=fr : display_name=allemand
disp_locale=de : display_name=Deutsch
-----------------
locale='fr'
disp_locale=en : display_name=French
disp_locale=fr : display_name=français
disp_locale=de : display_name=Französisch
-----------------
locale='ja'
disp_locale=en : display_name=Japanese
disp_locale=fr : display_name=japonais
disp_locale=de : display_name=Japanisch
-----------------
locale='i-enochian'
disp_locale=en : display_name=i-enochian #Private-Use=i-enochian#
disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian#
disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian#
-----------------
locale='zh-Hant'
disp_locale=en : display_name=Chinese #Traditional#
disp_locale=fr : display_name=chinois #traditionnel#
disp_locale=de : display_name=Chinesisch #Traditionell#
-----------------
locale='zh-Hans'
disp_locale=en : display_name=Chinese #Simplified#
disp_locale=fr : display_name=chinois #simplifié#
disp_locale=de : display_name=Chinesisch #Vereinfacht#
-----------------
locale='sr-Cyrl'
disp_locale=en : display_name=Serbian #Cyrillic#
disp_locale=fr : display_name=serbe #cyrillique#
disp_locale=de : display_name=Serbisch #Kyrillisch#
-----------------
locale='sr-Latn'
disp_locale=en : display_name=Serbian #Latin#
disp_locale=fr : display_name=serbe #latin#
disp_locale=de : display_name=Serbisch #Lateinisch#
-----------------
locale='zh-Hans-CN'
disp_locale=en : display_name=Chinese #Simplified, China#
disp_locale=fr : display_name=chinois #simplifié, Chine#
disp_locale=de : display_name=Chinesisch #Vereinfacht, China#
-----------------
locale='sr-Latn-CS'
disp_locale=en : display_name=Serbian #Latin, Serbia#
disp_locale=fr : display_name=serbe #latin, Serbie#
disp_locale=de : display_name=Serbisch #Lateinisch, Serbien#
-----------------
locale='sl-rozaj'
disp_locale=en : display_name=Slovenian #Resian#
disp_locale=fr : display_name=slovène #dialecte de Resia#
disp_locale=de : display_name=Slowenisch( #(ROZAJ|Resianisch)#)?
-----------------
locale='sl-nedis'
disp_locale=en : display_name=Slovenian #Natisone dialect#
disp_locale=fr : display_name=slovène #dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Natisone-Dialekt#
-----------------
locale='de-CH-1901'
disp_locale=en : display_name=German #Switzerland, Traditional German orthography#
disp_locale=fr : display_name=allemand #Suisse, orthographe allemande traditionnelle#
disp_locale=de : display_name=Deutsch #Schweiz, (1901|[aA]lte deutsche Rechtschreibung)#
-----------------
locale='sl-IT-nedis'
disp_locale=en : display_name=Slovenian #Italy, Natisone dialect#
disp_locale=fr : display_name=slovène #Italie, dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Italien, (NEDIS|Natisone-Dialekt)#
-----------------
locale='sl-Latn-IT-nedis'
disp_locale=en : display_name=Slovenian #Latin, Italy, Natisone dialect#
disp_locale=fr : display_name=slovène #latin, Italie, dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Lateinisch, Italien, (NEDIS|Natisone-Dialekt)#
-----------------
locale='de-DE'
disp_locale=en : display_name=German #Germany#
disp_locale=fr : display_name=allemand #Allemagne#
disp_locale=de : display_name=Deutsch #Deutschland#
-----------------
locale='en-US'
disp_locale=en : display_name=English #United States#
disp_locale=fr : display_name=anglais #États-Unis#
disp_locale=de : display_name=Englisch #Vereinigte Staaten#
-----------------
locale='es-419'
disp_locale=en : display_name=Spanish #Latin America#
disp_locale=fr : display_name=espagnol #Amérique latine#
disp_locale=de : display_name=Spanisch #Lateinamerika#
-----------------
locale='de-CH-x-phonebk'
disp_locale=en : display_name=German #Switzerland, Private-Use=phonebk#
disp_locale=fr : display_name=allemand #Suisse, Usage privé=phonebk#
disp_locale=de : display_name=Deutsch #Schweiz, Privatnutzung=phonebk#
-----------------
locale='az-Arab-x-AZE-derbend'
disp_locale=en : display_name=Azerbaijani #Arabic, Private-Use=aze-derbend#
disp_locale=fr : display_name=azéri #arabe, Usage privé=aze-derbend#
disp_locale=de : display_name=Aserbaidschanisch #Arabisch, Privatnutzung=aze-derbend#
-----------------
locale='zh-min'
disp_locale=en : display_name=Chinese #MIN#
disp_locale=fr : display_name=chinois #MIN#
disp_locale=de : display_name=Chinesisch #MIN#
-----------------
locale='zh-min-nan-Hant-CN'
disp_locale=en : display_name=Chinese #MIN, NAN_HANT_CN#
disp_locale=fr : display_name=chinois #MIN, NAN_HANT_CN#
disp_locale=de : display_name=Chinesisch #MIN, NAN_HANT_CN#
-----------------
locale='x-whatever'
disp_locale=en : display_name=x-whatever #Private-Use=whatever#
disp_locale=fr : display_name=x-whatever #Usage privé=whatever#
disp_locale=de : display_name=x-whatever #Privatnutzung=whatever#
-----------------
locale='qaa-Qaaa-QM-x-southern'
disp_locale=en : display_name=qaa #Qaaa, QM, Private-Use=southern#
disp_locale=fr : display_name=qaa #Qaaa, QM, Usage privé=southern#
disp_locale=de : display_name=qaa #Qaaa, QM, Privatnutzung=southern#
-----------------
locale='sr-Latn-QM'
disp_locale=en : display_name=Serbian #Latin, QM#
disp_locale=fr : display_name=serbe #latin, QM#
disp_locale=de : display_name=Serbisch #Lateinisch, QM#
-----------------
locale='sr-Qaaa-CS'
disp_locale=en : display_name=Serbian #Qaaa, Serbia#
disp_locale=fr : display_name=serbe #Qaaa, Serbie#
disp_locale=de : display_name=Serbisch #Qaaa, Serbien#
-----------------
locale='en-US-u-islamCal'
disp_locale=en : display_name=English #United States, attribute=islamcal#
disp_locale=fr : display_name=anglais #États-Unis, attribute=islamcal#
disp_locale=de : display_name=Englisch #Vereinigte Staaten, attribute=islamcal#
-----------------
locale='zh-CN-a-myExt-x-private'
disp_locale=en : display_name=Chinese #China, a=myext, Private-Use=private#
disp_locale=fr : display_name=chinois #Chine, a=myext, Usage privé=private#
disp_locale=de : display_name=Chinesisch #China, a=myext, Privatnutzung=private#
-----------------
locale='en-a-myExt-b-another'
disp_locale=en : display_name=English #a=myext, b=another#
disp_locale=fr : display_name=anglais #a=myext, b=another#
disp_locale=de : display_name=Englisch #a=myext, b=another#
-----------------
locale='de-419-DE'
disp_locale=en : display_name=German #Latin America, DE#
disp_locale=fr : display_name=allemand #Amérique latine, DE#
disp_locale=de : display_name=Deutsch #Lateinamerika, DE#
-----------------
locale='a-DE'
disp_locale=en : display_name=a #Germany#
disp_locale=fr : display_name=a #Allemagne#
disp_locale=de : display_name=a #Deutschland#
-----------------
locale='ar-a-aaa-b-bbb-a-ccc'
disp_locale=en : display_name=Arabic #a=aaa, b=bbb#
disp_locale=fr : display_name=arabe #a=aaa, b=bbb#
disp_locale=de : display_name=Arabisch #a=aaa, b=bbb#
-----------------
@@ -1,342 +0,0 @@
--TEST--
locale_get_display_name() icu >= 53.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
--FILE--
<?php
/*
* Try getting the display_name for different locales
* with Procedural and Object methods.
*/
function ut_main()
{
$res_str='';
$disp_locales=array('en','fr','de');
$locales = array(
'sl_IT_nedis_KIRTI',
'sl_IT_nedis-a-kirti-x-xyz',
'sl_IT_rozaj',
'sl_IT_NEDIS_ROJAZ_1901',
'i-enochian',
'zh-hakka',
'zh-wuu',
'i-tay',
'sgn-BE-nl',
'sgn-CH-de',
'sl_IT_rozaj@currency=EUR',
'uk-ua_CALIFORNIA@currency=;currency=GRN',
'root',
'uk@currency=EURO',
'Hindi',
//Simple language subtag
'de',
'fr',
'ja',
'i-enochian', //(example of a grandfathered tag)
//Language subtag plus Script subtag:
'zh-Hant',
'zh-Hans',
'sr-Cyrl',
'sr-Latn',
//Language-Script-Region
'zh-Hans-CN',
'sr-Latn-CS',
//Language-Variant
'sl-rozaj',
'sl-nedis',
//Language-Region-Variant
'de-CH-1901',
'sl-IT-nedis',
//Language-Script-Region-Variant
'sl-Latn-IT-nedis',
//Language-Region:
'de-DE',
'en-US',
'es-419',
//Private use subtags:
'de-CH-x-phonebk',
'az-Arab-x-AZE-derbend',
//Extended language subtags
'zh-min',
'zh-min-nan-Hant-CN',
//Private use registry values
'x-whatever',
'qaa-Qaaa-QM-x-southern',
'sr-Latn-QM',
'sr-Qaaa-CS',
/*Tags that use extensions (examples ONLY: extensions MUST be defined
by revision or update to this document or by RFC): */
'en-US-u-islamCal',
'zh-CN-a-myExt-x-private',
'en-a-myExt-b-another',
//Some Invalid Tags:
'de-419-DE',
'a-DE',
'ar-a-aaa-b-bbb-a-ccc'
);
$res_str = '';
foreach( $locales as $locale )
{
$res_str .= "locale='$locale'\n";
foreach( $disp_locales as $disp_locale )
{
$scr = ut_loc_get_display_name( $locale ,$disp_locale );
$scr = str_replace(array('(', ')'), '#', $scr);
$res_str .= "disp_locale=$disp_locale : display_name=$scr";
$res_str .= "\n";
}
$res_str .= "-----------------\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECTREGEX--
locale='sl_IT_nedis_KIRTI'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_KIRTI#
disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI#
-----------------
locale='sl_IT_nedis-a-kirti-x-xyz'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ#
disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ#
-----------------
locale='sl_IT_rozaj'
disp_locale=en : display_name=Slovenian #Italy, Resian#
disp_locale=fr : display_name=slovène #Italie, dialecte de Resia#
disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch)#
-----------------
locale='sl_IT_NEDIS_ROJAZ_1901'
disp_locale=en : display_name=Slovenian #Italy, NEDIS_ROJAZ_1901#
disp_locale=fr : display_name=slovène #Italie, NEDIS_ROJAZ_1901#
disp_locale=de : display_name=Slowenisch #Italien, NEDIS_ROJAZ_1901#
-----------------
locale='i-enochian'
disp_locale=en : display_name=i-enochian #Private-Use=i-enochian#
disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian#
disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian#
-----------------
locale='zh-hakka'
disp_locale=en : display_name=Chinese( #HAKKA#)?
disp_locale=fr : display_name=chinois( #HAKKA#)?
disp_locale=de : display_name=Chinesisch( #HAKKA#)?
-----------------
locale='zh-wuu'
disp_locale=en : display_name=Chinese #WUU#
disp_locale=fr : display_name=chinois #WUU#
disp_locale=de : display_name=Chinesisch #WUU#
-----------------
locale='i-tay'
disp_locale=en : display_name=i-tay
disp_locale=fr : display_name=i-tay
disp_locale=de : display_name=i-tay
-----------------
locale='sgn-BE-nl'
disp_locale=en : display_name=sgn #Belgium, NL#
disp_locale=fr : display_name=sgn #Belgique, NL#
disp_locale=de : display_name=sgn #Belgien, NL#
-----------------
locale='sgn-CH-de'
disp_locale=en : display_name=sgn #Switzerland, DE#
disp_locale=fr : display_name=sgn #Suisse, DE#
disp_locale=de : display_name=sgn #Schweiz, DE#
-----------------
locale='sl_IT_rozaj@currency=EUR'
disp_locale=en : display_name=Slovenian #Italy, Resian, [Cc]urrency=Euro#
disp_locale=fr : display_name=slovène #Italie, dialecte de Resia, [Dd]evise=euro#
disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch), Währung=Euro#
-----------------
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_name=
disp_locale=fr : display_name=
disp_locale=de : display_name=
-----------------
locale='root'
disp_locale=en : display_name=Root
disp_locale=fr : display_name=racine
disp_locale=de : display_name=[Rr]oot
-----------------
locale='uk@currency=EURO'
disp_locale=en : display_name=Ukrainian #[Cc]urrency=EURO#
disp_locale=fr : display_name=ukrainien #[Dd]evise=EURO#
disp_locale=de : display_name=Ukrainisch #Währung=EURO#
-----------------
locale='Hindi'
disp_locale=en : display_name=hindi
disp_locale=fr : display_name=hindi
disp_locale=de : display_name=hindi
-----------------
locale='de'
disp_locale=en : display_name=German
disp_locale=fr : display_name=allemand
disp_locale=de : display_name=Deutsch
-----------------
locale='fr'
disp_locale=en : display_name=French
disp_locale=fr : display_name=français
disp_locale=de : display_name=Französisch
-----------------
locale='ja'
disp_locale=en : display_name=Japanese
disp_locale=fr : display_name=japonais
disp_locale=de : display_name=Japanisch
-----------------
locale='i-enochian'
disp_locale=en : display_name=i-enochian #Private-Use=i-enochian#
disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian#
disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian#
-----------------
locale='zh-Hant'
disp_locale=en : display_name=Chinese #Traditional#
disp_locale=fr : display_name=chinois #traditionnel#
disp_locale=de : display_name=Chinesisch #Traditionell#
-----------------
locale='zh-Hans'
disp_locale=en : display_name=Chinese #Simplified#
disp_locale=fr : display_name=chinois #simplifié#
disp_locale=de : display_name=Chinesisch #Vereinfacht#
-----------------
locale='sr-Cyrl'
disp_locale=en : display_name=Serbian #Cyrillic#
disp_locale=fr : display_name=serbe #cyrillique#
disp_locale=de : display_name=Serbisch #Kyrillisch#
-----------------
locale='sr-Latn'
disp_locale=en : display_name=Serbian #Latin#
disp_locale=fr : display_name=serbe #latin#
disp_locale=de : display_name=Serbisch #Lateinisch#
-----------------
locale='zh-Hans-CN'
disp_locale=en : display_name=Chinese #Simplified, China#
disp_locale=fr : display_name=chinois #simplifié, Chine#
disp_locale=de : display_name=Chinesisch #Vereinfacht, China#
-----------------
locale='sr-Latn-CS'
disp_locale=en : display_name=Serbian #Latin, Serbia#
disp_locale=fr : display_name=serbe #latin, Serbie#
disp_locale=de : display_name=Serbisch #Lateinisch, Serbien#
-----------------
locale='sl-rozaj'
disp_locale=en : display_name=Slovenian #Resian#
disp_locale=fr : display_name=slovène #dialecte de Resia#
disp_locale=de : display_name=Slowenisch( #(ROZAJ|Resianisch)#)?
-----------------
locale='sl-nedis'
disp_locale=en : display_name=Slovenian #Natisone dialect#
disp_locale=fr : display_name=slovène #dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Natisone-Dialekt#
-----------------
locale='de-CH-1901'
disp_locale=en : display_name=German #Switzerland, Traditional German orthography#
disp_locale=fr : display_name=allemand #Suisse, orthographe allemande traditionnelle#
disp_locale=de : display_name=Deutsch #Schweiz, (1901|[aA]lte deutsche Rechtschreibung)#
-----------------
locale='sl-IT-nedis'
disp_locale=en : display_name=Slovenian #Italy, Natisone dialect#
disp_locale=fr : display_name=slovène #Italie, dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Italien, (NEDIS|Natisone-Dialekt)#
-----------------
locale='sl-Latn-IT-nedis'
disp_locale=en : display_name=Slovenian #Latin, Italy, Natisone dialect#
disp_locale=fr : display_name=slovène #latin, Italie, dialecte de Natisone#
disp_locale=de : display_name=Slowenisch #Lateinisch, Italien, (NEDIS|Natisone-Dialekt)#
-----------------
locale='de-DE'
disp_locale=en : display_name=German #Germany#
disp_locale=fr : display_name=allemand #Allemagne#
disp_locale=de : display_name=Deutsch #Deutschland#
-----------------
locale='en-US'
disp_locale=en : display_name=English #United States#
disp_locale=fr : display_name=anglais #États-Unis#
disp_locale=de : display_name=Englisch #Vereinigte Staaten#
-----------------
locale='es-419'
disp_locale=en : display_name=Spanish #Latin America#
disp_locale=fr : display_name=espagnol #Amérique latine#
disp_locale=de : display_name=Spanisch #Lateinamerika#
-----------------
locale='de-CH-x-phonebk'
disp_locale=en : display_name=German #Switzerland, Private-Use=phonebk#
disp_locale=fr : display_name=allemand #Suisse, Usage privé=phonebk#
disp_locale=de : display_name=Deutsch #Schweiz, Privatnutzung=phonebk#
-----------------
locale='az-Arab-x-AZE-derbend'
disp_locale=en : display_name=Azerbaijani #Arabic, Private-Use=aze-derbend#
disp_locale=fr : display_name=azéri #arabe, Usage privé=aze-derbend#
disp_locale=de : display_name=Aserbaidschanisch #Arabisch, Privatnutzung=aze-derbend#
-----------------
locale='zh-min'
disp_locale=en : display_name=Chinese #MIN#
disp_locale=fr : display_name=chinois #MIN#
disp_locale=de : display_name=Chinesisch #MIN#
-----------------
locale='zh-min-nan-Hant-CN'
disp_locale=en : display_name=Chinese #MIN, NAN_HANT_CN#
disp_locale=fr : display_name=chinois #MIN, NAN_HANT_CN#
disp_locale=de : display_name=Chinesisch #MIN, NAN_HANT_CN#
-----------------
locale='x-whatever'
disp_locale=en : display_name=x-whatever #Private-Use=whatever#
disp_locale=fr : display_name=x-whatever #Usage privé=whatever#
disp_locale=de : display_name=x-whatever #Privatnutzung=whatever#
-----------------
locale='qaa-Qaaa-QM-x-southern'
disp_locale=en : display_name=qaa #Qaaa, QM, Private-Use=southern#
disp_locale=fr : display_name=qaa #Qaaa, QM, Usage privé=southern#
disp_locale=de : display_name=qaa #Qaaa, QM, Privatnutzung=southern#
-----------------
locale='sr-Latn-QM'
disp_locale=en : display_name=Serbian #Latin, QM#
disp_locale=fr : display_name=serbe #latin, QM#
disp_locale=de : display_name=Serbisch #Lateinisch, QM#
-----------------
locale='sr-Qaaa-CS'
disp_locale=en : display_name=Serbian #Qaaa, Serbia#
disp_locale=fr : display_name=serbe #Qaaa, Serbie#
disp_locale=de : display_name=Serbisch #Qaaa, Serbien#
-----------------
locale='en-US-u-islamCal'
disp_locale=en : display_name=English #United States, attribute=islamcal#
disp_locale=fr : display_name=anglais #États-Unis, attribute=islamcal#
disp_locale=de : display_name=Englisch #Vereinigte Staaten, attribute=islamcal#
-----------------
locale='zh-CN-a-myExt-x-private'
disp_locale=en : display_name=Chinese #China, a=myext, Private-Use=private#
disp_locale=fr : display_name=chinois #Chine, a=myext, Usage privé=private#
disp_locale=de : display_name=Chinesisch #China, a=myext, Privatnutzung=private#
-----------------
locale='en-a-myExt-b-another'
disp_locale=en : display_name=English #a=myext, b=another#
disp_locale=fr : display_name=anglais #a=myext, b=another#
disp_locale=de : display_name=Englisch #a=myext, b=another#
-----------------
locale='de-419-DE'
disp_locale=en : display_name=German #Latin America, DE#
disp_locale=fr : display_name=allemand #Amérique latine, DE#
disp_locale=de : display_name=Deutsch #Lateinamerika, DE#
-----------------
locale='a-DE'
disp_locale=en : display_name=a #Germany#
disp_locale=fr : display_name=a #Allemagne#
disp_locale=de : display_name=a #Deutschland#
-----------------
locale='ar-a-aaa-b-bbb-a-ccc'
disp_locale=en : display_name=Arabic #a=aaa, b=bbb#
disp_locale=fr : display_name=arabe #a=aaa, b=bbb#
disp_locale=de : display_name=Arabisch #a=aaa, b=bbb#
-----------------
@@ -1,9 +1,8 @@
--TEST--
locale_get_display_region() icu >= 4.8 && icu < 51.2
locale_get_display_region() icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
@@ -1,275 +0,0 @@
--TEST--
locale_get_display_region() icu >= 51.2
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Try getting the display_region for different locales
* with Procedural and Object methods.
*/
function ut_main()
{
$res_str = '';
$disp_locales=array('en','fr','de');
$locales = array(
'uk-ua_CALIFORNIA@currency=;currency=GRN',
'root',
'uk@currency=EURO',
'Hindi',
//Simple language subtag
'de',
'fr',
'ja',
'i-enochian', //(example of a grandfathered tag)
//Language subtag plus Script subtag:
'zh-Hant',
'zh-Hans',
'sr-Cyrl',
'sr-Latn',
//Language-Script-Region
'zh-Hans-CN',
'sr-Latn-CS',
//Language-Variant
'sl-rozaj',
'sl-nedis',
//Language-Region-Variant
'de-CH-1901',
'sl-IT-nedis',
//Language-Script-Region-Variant
'sl-Latn-IT-nedis',
//Language-Region:
'de-DE',
'en-US',
'es-419',
//Private use subtags:
'de-CH-x-phonebk',
'az-Arab-x-AZE-derbend',
//Extended language subtags
'zh-min',
'zh-min-nan-Hant-CN',
//Private use registry values
'x-whatever',
'qaa-Qaaa-QM-x-southern',
'sr-Latn-QM',
'sr-Qaaa-CS',
/*Tags that use extensions (examples ONLY: extensions MUST be defined
by revision or update to this document or by RFC): */
'en-US-u-islamCal',
'zh-CN-a-myExt-x-private',
'en-a-myExt-b-another',
//Some Invalid Tags:
'de-419-DE',
'a-DE',
'ar-a-aaa-b-bbb-a-ccc'
);
$res_str = '';
foreach( $locales as $locale )
{
$res_str .= "locale='$locale'\n";
foreach( $disp_locales as $disp_locale )
{
$scr = ut_loc_get_display_region( $locale ,$disp_locale );
$res_str .= "disp_locale=$disp_locale : display_region=$scr";
$res_str .= "\n";
}
$res_str .= "-----------------\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECTREGEX--
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_region=Ukraine
disp_locale=fr : display_region=Ukraine
disp_locale=de : display_region=Ukraine
-----------------
locale='root'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='uk@currency=EURO'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='Hindi'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='de'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='fr'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='ja'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='i-enochian'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='zh-Hant'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='zh-Hans'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='sr-Cyrl'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='sr-Latn'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='zh-Hans-CN'
disp_locale=en : display_region=China
disp_locale=fr : display_region=Chine
disp_locale=de : display_region=China
-----------------
locale='sr-Latn-CS'
disp_locale=en : display_region=Serbia
disp_locale=fr : display_region=Serbie
disp_locale=de : display_region=Serbien
-----------------
locale='sl-rozaj'
disp_locale=en : display_region=(ROZAJ)?
disp_locale=fr : display_region=(ROZAJ)?
disp_locale=de : display_region=(ROZAJ)?
-----------------
locale='sl-nedis'
disp_locale=en : display_region=(NEDIS)?
disp_locale=fr : display_region=(NEDIS)?
disp_locale=de : display_region=(NEDIS)?
-----------------
locale='de-CH-1901'
disp_locale=en : display_region=Switzerland
disp_locale=fr : display_region=Suisse
disp_locale=de : display_region=Schweiz
-----------------
locale='sl-IT-nedis'
disp_locale=en : display_region=Italy
disp_locale=fr : display_region=Italie
disp_locale=de : display_region=Italien
-----------------
locale='sl-Latn-IT-nedis'
disp_locale=en : display_region=Italy
disp_locale=fr : display_region=Italie
disp_locale=de : display_region=Italien
-----------------
locale='de-DE'
disp_locale=en : display_region=Germany
disp_locale=fr : display_region=Allemagne
disp_locale=de : display_region=Deutschland
-----------------
locale='en-US'
disp_locale=en : display_region=United States
disp_locale=fr : display_region=États-Unis
disp_locale=de : display_region=Vereinigte Staaten
-----------------
locale='es-419'
disp_locale=en : display_region=Latin America
disp_locale=fr : display_region=Amérique latine
disp_locale=de : display_region=Lateinamerika
-----------------
locale='de-CH-x-phonebk'
disp_locale=en : display_region=Switzerland
disp_locale=fr : display_region=Suisse
disp_locale=de : display_region=Schweiz
-----------------
locale='az-Arab-x-AZE-derbend'
disp_locale=en : display_region=X?
disp_locale=fr : display_region=X?
disp_locale=de : display_region=X?
-----------------
locale='zh-min'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='zh-min-nan-Hant-CN'
disp_locale=en : display_region=MIN
disp_locale=fr : display_region=MIN
disp_locale=de : display_region=MIN
-----------------
locale='x-whatever'
disp_locale=en : display_region=
disp_locale=fr : display_region=
disp_locale=de : display_region=
-----------------
locale='qaa-Qaaa-QM-x-southern'
disp_locale=en : display_region=QM
disp_locale=fr : display_region=QM
disp_locale=de : display_region=QM
-----------------
locale='sr-Latn-QM'
disp_locale=en : display_region=QM
disp_locale=fr : display_region=QM
disp_locale=de : display_region=QM
-----------------
locale='sr-Qaaa-CS'
disp_locale=en : display_region=Serbia
disp_locale=fr : display_region=Serbie
disp_locale=de : display_region=Serbien
-----------------
locale='en-US-u-islamCal'
disp_locale=en : display_region=United States
disp_locale=fr : display_region=États-Unis
disp_locale=de : display_region=Vereinigte Staaten
-----------------
locale='zh-CN-a-myExt-x-private'
disp_locale=en : display_region=China
disp_locale=fr : display_region=Chine
disp_locale=de : display_region=China
-----------------
locale='en-a-myExt-b-another'
disp_locale=en : display_region=A?
disp_locale=fr : display_region=A?
disp_locale=de : display_region=A?
-----------------
locale='de-419-DE'
disp_locale=en : display_region=Latin America
disp_locale=fr : display_region=Amérique latine
disp_locale=de : display_region=Lateinamerika
-----------------
locale='a-DE'
disp_locale=en : display_region=Germany
disp_locale=fr : display_region=Allemagne
disp_locale=de : display_region=Deutschland
-----------------
locale='ar-a-aaa-b-bbb-a-ccc'
disp_locale=en : display_region=A?
disp_locale=fr : display_region=A?
disp_locale=de : display_region=A?
-----------------
@@ -2,7 +2,7 @@
locale_get_display_script() icu >= 49
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '49') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '49') < 0) print 'skip'; ?>
--FILE--
<?php
@@ -1,275 +0,0 @@
--TEST--
locale_get_display_script() icu >= 52.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '52.1') < 0) print 'skip'; ?>
--FILE--
<?php
/*
* Try getting the display_script for different locales
* with Procedural and Object methods.
*/
function ut_main()
{
$res_str = '';
$disp_locales=array('en','fr','de');
$locales = array(
'uk-ua_CALIFORNIA@currency=;currency=GRN',
'root',
'uk@currency=EURO',
'Hindi',
//Simple language subtag
'de',
'fr',
'ja',
'i-enochian', //(example of a grandfathered tag)
//Language subtag plus Script subtag:
'zh-Hant',
'zh-Hans',
'sr-Cyrl',
'sr-Latn',
//Language-Script-Region
'zh-Hans-CN',
'sr-Latn-CS',
//Language-Variant
'sl-rozaj',
'sl-nedis',
//Language-Region-Variant
'de-CH-1901',
'sl-IT-nedis',
//Language-Script-Region-Variant
'sl-Latn-IT-nedis',
//Language-Region:
'de-DE',
'en-US',
'es-419',
//Private use subtags:
'de-CH-x-phonebk',
'az-Arab-x-AZE-derbend',
//Extended language subtags
'zh-min',
'zh-min-nan-Hant-CN',
//Private use registry values
'x-whatever',
'qaa-Qaaa-QM-x-southern',
'sr-Latn-QM',
'sr-Qaaa-CS',
/*Tags that use extensions (examples ONLY: extensions MUST be defined
by revision or update to this document or by RFC): */
'en-US-u-islamCal',
'zh-CN-a-myExt-x-private',
'en-a-myExt-b-another',
//Some Invalid Tags:
'de-419-DE',
'a-DE',
'ar-a-aaa-b-bbb-a-ccc'
);
$res_str = '';
foreach( $locales as $locale )
{
$res_str .= "locale='$locale'\n";
foreach( $disp_locales as $disp_locale )
{
$scr = ut_loc_get_display_script( $locale ,$disp_locale );
$res_str .= "disp_locale=$disp_locale : display_script=$scr";
$res_str .= "\n";
}
$res_str .= "-----------------\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='root'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='uk@currency=EURO'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='Hindi'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='de'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='fr'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='ja'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='i-enochian'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='zh-Hant'
disp_locale=en : display_script=Traditional Han
disp_locale=fr : display_script=sinogrammes traditionnels
disp_locale=de : display_script=Traditionelles Chinesisch
-----------------
locale='zh-Hans'
disp_locale=en : display_script=Simplified Han
disp_locale=fr : display_script=sinogrammes simplifiés
disp_locale=de : display_script=Vereinfachtes Chinesisch
-----------------
locale='sr-Cyrl'
disp_locale=en : display_script=Cyrillic
disp_locale=fr : display_script=cyrillique
disp_locale=de : display_script=Kyrillisch
-----------------
locale='sr-Latn'
disp_locale=en : display_script=Latin
disp_locale=fr : display_script=latin
disp_locale=de : display_script=Lateinisch
-----------------
locale='zh-Hans-CN'
disp_locale=en : display_script=Simplified Han
disp_locale=fr : display_script=sinogrammes simplifiés
disp_locale=de : display_script=Vereinfachtes Chinesisch
-----------------
locale='sr-Latn-CS'
disp_locale=en : display_script=Latin
disp_locale=fr : display_script=latin
disp_locale=de : display_script=Lateinisch
-----------------
locale='sl-rozaj'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='sl-nedis'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='de-CH-1901'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='sl-IT-nedis'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='sl-Latn-IT-nedis'
disp_locale=en : display_script=Latin
disp_locale=fr : display_script=latin
disp_locale=de : display_script=Lateinisch
-----------------
locale='de-DE'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='en-US'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='es-419'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='de-CH-x-phonebk'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='az-Arab-x-AZE-derbend'
disp_locale=en : display_script=Arabic
disp_locale=fr : display_script=arabe
disp_locale=de : display_script=Arabisch
-----------------
locale='zh-min'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='zh-min-nan-Hant-CN'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='x-whatever'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='qaa-Qaaa-QM-x-southern'
disp_locale=en : display_script=Qaaa
disp_locale=fr : display_script=Qaaa
disp_locale=de : display_script=Qaaa
-----------------
locale='sr-Latn-QM'
disp_locale=en : display_script=Latin
disp_locale=fr : display_script=latin
disp_locale=de : display_script=Lateinisch
-----------------
locale='sr-Qaaa-CS'
disp_locale=en : display_script=Qaaa
disp_locale=fr : display_script=Qaaa
disp_locale=de : display_script=Qaaa
-----------------
locale='en-US-u-islamCal'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='zh-CN-a-myExt-x-private'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='en-a-myExt-b-another'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='de-419-DE'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='a-DE'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
locale='ar-a-aaa-b-bbb-a-ccc'
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
-----------------
-1
View File
@@ -2,7 +2,6 @@
locale_lookup.phpt()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
-100
View File
@@ -1,100 +0,0 @@
--TEST--
locale_lookup.phpt()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
/*
* Try parsing different Locales
* with Procedural and Object methods.
*/
function ut_main()
{
$loc_ranges = array(
'de-de',
'sl_IT',
'sl_IT_Nedis',
'jbo',
'art-lojban'
);
$lang_tags = array(
'de-DEVA',
'de-DE-1996',
'de-DE',
'zh_Hans',
'de-CH-1996',
'sl_IT',
'sl_IT_nedis-a-kirti-x-xyz',
'sl_IT_rozaj',
'sl_IT_NEDIS_ROJAZ_1901',
'i-enochian',
'sgn-CH-de',
'art-lojban',
'i-lux',
'art-lojban',
'jbo',
'en_sl_IT',
'zh-Hant-CN-x-prv1-prv2'
);
$res_str = '';
$isCanonical = false;
foreach($loc_ranges as $loc_range){
$res_str .="--------------\n";
$result= ut_loc_locale_lookup( $lang_tags , $loc_range,$isCanonical,"en_US");
$comma_arr =implode(",",$lang_tags);
$res_str .= "loc_range:$loc_range \nlang_tags: $comma_arr\n";
$res_str .= "\nlookup result:$result\n";
//canonicalized version
$result= ut_loc_locale_lookup( $lang_tags , $loc_range,!($isCanonical),"en_US");
$can_loc_range = ut_loc_canonicalize($loc_range);
$res_str .= "Canonical lookup result:$result\n";
}
$res_str .= "\n";
return $res_str;
}
include_once( 'ut_common.inc' );
ut_run();
?>
--EXPECT--
--------------
loc_range:de-de
lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2
lookup result:de-DE
Canonical lookup result:de_de
--------------
loc_range:sl_IT
lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2
lookup result:sl_IT
Canonical lookup result:sl_it
--------------
loc_range:sl_IT_Nedis
lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2
lookup result:sl_IT
Canonical lookup result:sl_it
--------------
loc_range:jbo
lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2
lookup result:jbo
Canonical lookup result:jbo
--------------
loc_range:art-lojban
lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2
lookup result:art-lojban
Canonical lookup result:art__lojban
@@ -3,9 +3,11 @@ ResourceBundle constructor bundle accepts NULL for first two arguments
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '4.8') < 0) die('skip ICU >= 4.8 only'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
die('skip ICU >= 4.8 only');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -1,26 +0,0 @@
--TEST--
ResourceBundle constructor bundle accepts NULL for first two arguments
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
<?php
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
$r = new ResourceBundle('en_US', NULL);
$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0);
var_dump($c);
ini_set('intl.default_locale', 'pt_PT');
$r = new ResourceBundle(NULL, NULL);
$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0);
var_dump($c);
?>
==DONE==
--EXPECT--
string(14) "h:mm:ss a zzzz"
string(13) "HH:mm:ss zzzz"
==DONE==
+8 -10
View File
@@ -219,7 +219,7 @@ static inline void json_pretty_print_indent(smart_str *buf, int options TSRMLS_D
static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC) /* {{{ */
{
int i, r, need_comma = 0;
int i, r;
HashTable *myht;
if (Z_TYPE_PP(val) == IS_ARRAY) {
@@ -242,6 +242,7 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
smart_str_appendc(buf, '{');
}
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
++JSON_G(encoder_depth);
i = myht ? zend_hash_num_elements(myht) : 0;
@@ -254,6 +255,7 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
uint key_len;
HashPosition pos;
HashTable *tmp_ht;
int need_comma = 0;
zend_hash_internal_pointer_reset_ex(myht, &pos);
for (;; zend_hash_move_forward_ex(myht, &pos)) {
@@ -270,11 +272,11 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
if (r == PHP_JSON_OUTPUT_ARRAY) {
if (need_comma) {
smart_str_appendc(buf, ',');
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
} else {
need_comma = 1;
}
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
json_pretty_print_indent(buf, options TSRMLS_CC);
php_json_encode(buf, *data, options TSRMLS_CC);
} else if (r == PHP_JSON_OUTPUT_OBJECT) {
@@ -289,11 +291,11 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
if (need_comma) {
smart_str_appendc(buf, ',');
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
} else {
need_comma = 1;
}
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
json_pretty_print_indent(buf, options TSRMLS_CC);
json_escape_string(buf, key, key_len - 1, options & ~PHP_JSON_NUMERIC_CHECK TSRMLS_CC);
@@ -305,11 +307,11 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
} else {
if (need_comma) {
smart_str_appendc(buf, ',');
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
} else {
need_comma = 1;
}
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
json_pretty_print_indent(buf, options TSRMLS_CC);
smart_str_appendc(buf, '"');
@@ -331,12 +333,8 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
}
--JSON_G(encoder_depth);
/* Only keep closing bracket on same line for empty arrays/objects */
if (need_comma) {
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
json_pretty_print_indent(buf, options TSRMLS_CC);
}
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
json_pretty_print_indent(buf, options TSRMLS_CC);
if (r == PHP_JSON_OUTPUT_ARRAY) {
smart_str_appendc(buf, ']');
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #66021 (Blank line inside empty array/object when JSON_PRETTY_PRINT is set)
--SKIPIF--
<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
class Foo {
private $bar = 'baz';
}
echo json_encode([[], (object)[], new Foo], JSON_PRETTY_PRINT), "\n";
?>
--EXPECT--
[
[],
{},
{}
]
-10
View File
@@ -399,16 +399,6 @@ PHP_FUNCTION(ldap_bind)
RETURN_FALSE;
}
if (ldap_bind_dn != NULL && memchr(ldap_bind_dn, '\0', ldap_bind_dnlen) != NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "DN contains a null byte");
RETURN_FALSE;
}
if (ldap_bind_pw != NULL && memchr(ldap_bind_pw, '\0', ldap_bind_pwlen) != NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Password contains a null byte");
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link, -1, "ldap link", le_link);
if ((rc = ldap_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw, LDAP_AUTH_SIMPLE)) != LDAP_SUCCESS) {
+12 -12
View File
@@ -4321,7 +4321,6 @@ PHP_FUNCTION(openssl_seal)
if (!EVP_EncryptInit(&ctx,cipher,NULL,NULL)) {
RETVAL_FALSE;
EVP_CIPHER_CTX_cleanup(&ctx);
goto clean_exit;
}
@@ -4332,12 +4331,10 @@ PHP_FUNCTION(openssl_seal)
#endif
/* allocate one byte extra to make room for \0 */
buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(&ctx));
EVP_CIPHER_CTX_cleanup(&ctx);
if (!EVP_SealInit(&ctx, cipher, eks, eksl, NULL, pkeys, nkeys) || !EVP_SealUpdate(&ctx, buf, &len1, (unsigned char *)data, data_len)) {
RETVAL_FALSE;
efree(buf);
EVP_CIPHER_CTX_cleanup(&ctx);
goto clean_exit;
}
@@ -4370,7 +4367,6 @@ PHP_FUNCTION(openssl_seal)
efree(buf);
}
RETVAL_LONG(len1 + len2);
EVP_CIPHER_CTX_cleanup(&ctx);
clean_exit:
for (i=0; i<nkeys; i++) {
@@ -4429,21 +4425,25 @@ PHP_FUNCTION(openssl_open)
if (EVP_OpenInit(&ctx, cipher, (unsigned char *)ekey, ekey_len, NULL, pkey) && EVP_OpenUpdate(&ctx, buf, &len1, (unsigned char *)data, data_len)) {
if (!EVP_OpenFinal(&ctx, buf + len1, &len2) || (len1 + len2 == 0)) {
efree(buf);
RETVAL_FALSE;
} else {
zval_dtor(opendata);
buf[len1 + len2] = '\0';
ZVAL_STRINGL(opendata, erealloc(buf, len1 + len2 + 1), len1 + len2, 0);
RETVAL_TRUE;
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
RETURN_FALSE;
}
} else {
efree(buf);
RETVAL_FALSE;
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
RETURN_FALSE;
}
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
EVP_CIPHER_CTX_cleanup(&ctx);
zval_dtor(opendata);
buf[len1 + len2] = '\0';
ZVAL_STRINGL(opendata, erealloc(buf, len1 + len2 + 1), len1 + len2, 0);
RETURN_TRUE;
}
/* }}} */
+1 -1
View File
@@ -1,2 +1,2 @@
Firebird driver for PDO
Firebird/InterBase driver for PDO
Ard Biesheuvel
+4
View File
@@ -1,3 +1,7 @@
dnl
dnl $Id$
dnl
PHP_ARG_WITH(pdo-firebird,for Firebird support for PDO,
[ --with-pdo-firebird[=DIR] PDO: Firebird support. DIR is the Firebird base
install directory [/opt/firebird]])
+1
View File
@@ -1,3 +1,4 @@
// $Id$
// vim:ft=javascript
ARG_WITH("pdo-firebird", "Firebird support for PDO", "no");
+6 -4
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -605,14 +607,14 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *val TS
static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info TSRMLS_DC) /* {{{ */
{
pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
const ISC_STATUS *s = H->isc_status;
ISC_STATUS *s = H->isc_status;
char buf[400];
long i = 0, l, sqlcode = isc_sqlcode(s);
if (sqlcode) {
add_next_index_long(info, sqlcode);
while ((sizeof(buf)>(i+2))&&(l = fb_interpret(&buf[i],(sizeof(buf)-i-2),&s))) {
while ((l = isc_interprete(&buf[i],&s))) {
i += l;
strcpy(&buf[i++], " ");
}
@@ -695,8 +697,8 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRM
if (!dbh->methods) {
char errmsg[512];
const ISC_STATUS *s = H->isc_status;
fb_interpret(errmsg, sizeof(errmsg),&s);
ISC_STATUS *s = H->isc_status;
isc_interprete(errmsg, &s);
zend_throw_exception_ex(php_pdo_get_exception(), H->isc_status[1] TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
"HY000", H->isc_status[1], errmsg);
}
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+3 -1
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -89,7 +91,7 @@ PHP_MSHUTDOWN_FUNCTION(pdo_firebird) /* {{{ */
PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
{
php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for Firebird", "enabled");
php_info_print_table_header(2, "PDO Driver for Firebird/InterBase", "enabled");
php_info_print_table_end();
}
/* }}} */
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_PDO_FIREBIRD_H
#define PHP_PDO_FIREBIRD_H
+2
View File
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_PDO_FIREBIRD_INT_H
#define PHP_PDO_FIREBIRD_INT_H
+2 -2
View File
@@ -34,6 +34,6 @@ Basic test of POSIX getpgid(), kill(), get_last_error() and strerror() functions
Kill pid=%d
bool(false)
int(%d)
string(%d) %s%rNo such process|Operation not permitted%r%s
string(%d) %sNo such process%s
===DONE====
+14 -23
View File
@@ -50,12 +50,6 @@
#define FILE_PREFIX "sess_"
#ifdef PHP_WIN32
# ifndef O_NOFOLLOW
# define O_NOFOLLOW 0
# endif
#endif
typedef struct {
int fd;
char *lastkey;
@@ -152,7 +146,6 @@ static void ps_files_close(ps_files *data)
static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
{
char buf[MAXPATHLEN];
struct stat sbuf;
if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) {
if (data->lastkey) {
@@ -173,26 +166,24 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
data->lastkey = estrdup(key);
/* O_NOFOLLOW to prevent us from following evil symlinks */
#ifdef O_NOFOLLOW
data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);
#else
/* Check to make sure that the opened file is not outside of allowable dirs.
This is not 100% safe but it's hard to do something better without O_NOFOLLOW */
if(PG(open_basedir) && lstat(buf, &sbuf) == 0 && S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) {
return;
}
data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY, data->filemode);
#endif
if (data->fd != -1) {
#ifndef PHP_WIN32
/* check that this session file was created by us or root – we
don't want to end up accepting the sessions of another webapp */
if (fstat(data->fd, &sbuf) || (sbuf.st_uid != 0 && sbuf.st_uid != getuid() && sbuf.st_uid != geteuid())) {
close(data->fd);
data->fd = -1;
return;
/* check to make sure that the opened file is not a symlink, linking to data outside of allowable dirs */
if (PG(open_basedir)) {
struct stat sbuf;
if (fstat(data->fd, &sbuf)) {
close(data->fd);
data->fd = -1;
return;
}
if (S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) {
close(data->fd);
data->fd = -1;
return;
}
}
#endif
flock(data->fd, LOCK_EX);
+1 -1
View File
@@ -1129,7 +1129,7 @@ static HashTable * sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{
node = NULL;
} else if (sxe->iter.type != SXE_ITER_CHILD) {
if ( !node->children || !node->parent || !node->next || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
if ( !node->children || !node->parent || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
node = node->children;
} else {
iter_data = sxe->iter.data;
-68
View File
@@ -1,68 +0,0 @@
--TEST--
Bug #66084 simplexml_load_string() mangles empty node name, var_dump variant
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip simplexml not available"; ?>
--FILE--
<?php
echo var_dump(simplexml_load_string('<a><b/><c><x/></c></a>')), "\n";
echo var_dump(simplexml_load_string('<a><b/><d/><c><x/></c></a>')), "\n";
echo var_dump(simplexml_load_string('<a><b/><c><d/><x/></c></a>')), "\n";
echo var_dump(simplexml_load_string('<a><b/><c><d><x/></d></c></a>')), "\n";
?>
--EXPECT--
object(SimpleXMLElement)#1 (2) {
["b"]=>
object(SimpleXMLElement)#2 (0) {
}
["c"]=>
object(SimpleXMLElement)#3 (1) {
["x"]=>
object(SimpleXMLElement)#4 (0) {
}
}
}
object(SimpleXMLElement)#1 (3) {
["b"]=>
object(SimpleXMLElement)#3 (0) {
}
["d"]=>
object(SimpleXMLElement)#2 (0) {
}
["c"]=>
object(SimpleXMLElement)#4 (1) {
["x"]=>
object(SimpleXMLElement)#5 (0) {
}
}
}
object(SimpleXMLElement)#1 (2) {
["b"]=>
object(SimpleXMLElement)#4 (0) {
}
["c"]=>
object(SimpleXMLElement)#2 (2) {
["d"]=>
object(SimpleXMLElement)#3 (0) {
}
["x"]=>
object(SimpleXMLElement)#5 (0) {
}
}
}
object(SimpleXMLElement)#1 (2) {
["b"]=>
object(SimpleXMLElement)#2 (0) {
}
["c"]=>
object(SimpleXMLElement)#4 (1) {
["d"]=>
object(SimpleXMLElement)#5 (1) {
["x"]=>
object(SimpleXMLElement)#3 (0) {
}
}
}
}
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #66084 simplexml_load_string() mangles empty node name, json variant
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip simplexml not available"; ?>
<?php if (!extension_loaded("json")) print "skip json not available"; ?>
--FILE--
<?php
echo json_encode(simplexml_load_string('<a><b/><c><x/></c></a>')), "\n";
echo json_encode(simplexml_load_string('<a><b/><d/><c><x/></c></a>')), "\n";
echo json_encode(simplexml_load_string('<a><b/><c><d/><x/></c></a>')), "\n";
echo json_encode(simplexml_load_string('<a><b/><c><d><x/></d></c></a>')), "\n";
?>
--EXPECT--
{"b":{},"c":{"x":{}}}
{"b":{},"d":{},"c":{"x":{}}}
{"b":{},"c":{"d":{},"x":{}}}
{"b":{},"c":{"d":{"x":{}}}}
-4
View File
@@ -30,9 +30,6 @@
#include <unistd.h>
#endif
#include "php_image.h"
#ifdef PHP_WIN32
#include "win32/php_stdint.h"
#endif
#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
#include "zlib.h"
@@ -166,7 +163,6 @@ static struct gfxinfo *php_handle_bmp (php_stream * stream TSRMLS_DC)
result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo));
result->width = (((unsigned int)dim[ 7]) << 24) + (((unsigned int)dim[ 6]) << 16) + (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]);
result->height = (((unsigned int)dim[11]) << 24) + (((unsigned int)dim[10]) << 16) + (((unsigned int)dim[ 9]) << 8) + ((unsigned int) dim[ 8]);
result->height = abs((int32_t)result->height);
result->bits = (((unsigned int)dim[15]) << 8) + ((unsigned int)dim[14]);
} else {
return NULL;
+1 -16
View File
@@ -23,22 +23,7 @@ GetImageSize()
var_dump($result);
?>
--EXPECT--
array(13) {
["test-1pix.bmp"]=>
array(6) {
[0]=>
int(1)
[1]=>
int(1)
[2]=>
int(6)
[3]=>
string(20) "width="1" height="1""
["bits"]=>
int(24)
["mime"]=>
string(14) "image/x-ms-bmp"
}
array(12) {
["test1bpix.bmp"]=>
array(6) {
[0]=>
@@ -25,9 +25,7 @@ image_type_to_mime_type()
var_dump($result);
?>
--EXPECT--
array(13) {
["test-1pix.bmp"]=>
string(14) "image/x-ms-bmp"
array(12) {
["test1bpix.bmp"]=>
string(14) "image/x-ms-bmp"
["test1pix.bmp"]=>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 B

-21
View File
@@ -1,21 +0,0 @@
--TEST--
Bug #64330 (stream_socket_server() creates wrong Abstract Namespace UNIX sockets)
--SKIPIF--
<?php
if (!in_array("unix", stream_get_transports())) die("SKIP unix domain sockets unavailable");
if (!stristr(PHP_OS, "Linux")) die('skip abstract namespace is a Linux-only feature');
?>
--FILE--
<?php
echo "Test\n";
$server = stream_socket_server("unix://\x00/MyBindName");
$client = stream_socket_client("unix://\x00/MyBindName");
if ($client) {
echo "ok\n";
}
?>
===DONE===
--EXPECT--
Test
ok
===DONE===
-78
View File
@@ -1,78 +0,0 @@
--TEST--
Bug #61019 (Out of memory on command stream_get_contents)
--FILE--
<?php
echo "Test\n";
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("pipe", "w") // stderr is a pipe that the child will write to
);
$process=proc_open("echo testtext",$descriptorspec,$pipes);
if(is_resource($process))
{
stream_set_blocking($pipes[0],false);
stream_set_blocking($pipes[1],false);
stream_set_blocking($pipes[2],false);
stream_set_write_buffer($pipes[0],0);
stream_set_read_buffer($pipes[1],0);
stream_set_read_buffer($pipes[2],0);
$stdin_stream="";
$stderr_stream="";
echo "External command executed\n";
do
{
$process_state=proc_get_status($process);
$tmp_stdin=stream_get_contents($pipes[1]);
if($tmp_stdin)
{
$stdin_stream=$stdin_stream.$tmp_stdin;
}
$tmp_stderr=stream_get_contents($pipes[2]);
if($tmp_stderr)
{
$stderr_stream=$stderr_stream.$tmp_stderr;
}
} while($process_state['running']);
echo "External command exit: ".$process_state['exitcode']."\n";
//read outstanding data
$tmp_stdin=stream_get_contents($pipes[1]);
if($tmp_stdin)
{
$stdin_stream=$stdin_stream.$tmp_stdin;
}
$tmp_stderr=stream_get_contents($pipes[2]);
if($tmp_stderr)
{
$stderr_stream=$stderr_stream.$tmp_stderr;
}
fclose ($pipes[0]);
fclose ($pipes[1]);
fclose ($pipes[2]);
proc_close($process);
echo "STDOUT: ".$stdin_stream."\n";
echo "STDERR: ".$stderr_stream."\n";
}
else
{
echo "Can't start external command\n";
}
?>
===DONE===
--EXPECT--
Test
External command executed
External command exit: 0
STDOUT: testtext
STDERR:
===DONE===
-40
View File
@@ -1,40 +0,0 @@
--TEST--
Bug #64604 parse_url is inconsistent with specified port
--FILE--
<?php
var_dump(parse_url('//localhost/path'));
var_dump(parse_url('//localhost:80/path'));
var_dump(parse_url('//localhost:/path'));
var_dump(parse_url('http://localhost:80/path'));
?>
--EXPECT--
array(2) {
["host"]=>
string(9) "localhost"
["path"]=>
string(5) "/path"
}
array(3) {
["host"]=>
string(9) "localhost"
["port"]=>
int(80)
["path"]=>
string(5) "/path"
}
array(2) {
["host"]=>
string(9) "localhost"
["path"]=>
string(5) "/path"
}
array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(9) "localhost"
["port"]=>
int(80)
["path"]=>
string(5) "/path"
}
+4 -4
View File
@@ -181,10 +181,6 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
p = e + 1;
pp = p;
if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
s += 2;
}
while (pp-p < 6 && isdigit(*pp)) {
pp++;
}
@@ -205,6 +201,10 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
STR_FREE(ret->scheme);
efree(ret);
return NULL;
} else if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
s += 2;
} else {
goto just_path;
}
} else if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
s += 2;
-5
View File
@@ -180,11 +180,6 @@ php_stream_filter_status_t userfilter_filter(
zval zpropname;
int call_result;
/* the userfilter object probably doesn't exist anymore */
if (CG(unclean_shutdown)) {
return ret;
}
if (FAILURE == zend_hash_find(Z_OBJPROP_P(obj), "stream", sizeof("stream"), (void**)&zstream)) {
/* Give the userfilter class a hook back to the stream */
ALLOC_INIT_ZVAL(zstream);
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0"?>
<collection>
<cd>
<title>Fight for your mind</title>
<artist>Ben Harper</artist>
<year>1995</year>
</cd>
<cd>
<title>Electric Ladyland</title>
<artist>Jimi Hendrix</artist>
<year>1997</year>
</cd>
</collection>
-11
View File
@@ -1,11 +0,0 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="include.xsl"/>
<xsl:param name="owner" select="'Nicolas Eliaszewicz'"/>
<xsl:output method="html" encoding="iso-8859-1" indent="no"/>
<xsl:template match="collection">
Hey! Welcome to <xsl:value-of select="$owner"/>'s sweet CD collection!
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
-7
View File
@@ -1,7 +0,0 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="cd">
<h1><xsl:value-of select="title"/></h1>
<h2>by <xsl:value-of select="artist"/> - <xsl:value-of select="year"/></h2>
<hr />
</xsl:template>
</xsl:stylesheet>
-27
View File
@@ -1,27 +0,0 @@
--TEST--
Bug #53965 (<xsl:include> cannot find files with relative paths when loaded with "file://")
--SKIPIF--
<?php
if (!extension_loaded('xsl')) die("skip Extension XSL is required\n");
?>
--FILE--
<?php
$base = 'file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . '53965';
$xml = new DOMDocument();
$xml->load($base . DIRECTORY_SEPARATOR . 'collection.xml');
$xsl = new DOMDocument();
$xsl->load($base . DIRECTORY_SEPARATOR . 'collection.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);
echo $proc->transformToXML($xml);
?>
--EXPECTF--
Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
<h1>Fight for your mind</h1><h2>by Ben Harper - 1995</h2><hr>
<h1>Electric Ladyland</h1><h2>by Jimi Hendrix - 1997</h2><hr>
+1 -1
View File
@@ -717,7 +717,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
header_line = estrndup(header_line, header_line_len);
/* cut off trailing spaces, linefeeds and carriage-returns */
/* cut of trailing spaces, linefeeds and carriage-returns */
if (header_line_len && isspace(header_line[header_line_len-1])) {
do {
header_line_len--;
-14
View File
@@ -234,13 +234,6 @@ PHPAPI int php_output_get_status(TSRMLS_D)
* Unbuffered write */
PHPAPI int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
{
#if PHP_DEBUG
if (len > UINT_MAX) {
php_error(E_WARNING, "Attempt to output more than UINT_MAX bytes at once; "
"output will be truncated %lu => %lu",
(unsigned long) len, (unsigned long) (len % UINT_MAX));
}
#endif
if (OG(flags) & PHP_OUTPUT_DISABLED) {
return 0;
}
@@ -255,13 +248,6 @@ PHPAPI int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
* Buffered write */
PHPAPI int php_output_write(const char *str, size_t len TSRMLS_DC)
{
#if PHP_DEBUG
if (len > UINT_MAX) {
php_error(E_WARNING, "Attempt to output more than UINT_MAX bytes at once; "
"output will be truncated %lu => %lu",
(unsigned long) len, (unsigned long) (len % UINT_MAX));
}
#endif
if (OG(flags) & PHP_OUTPUT_DISABLED) {
return 0;
}
+1 -1
View File
@@ -519,7 +519,7 @@ static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC)
Z_ADDREF_P(arr);
Z_ADDREF_P(argc);
zend_hash_update(&EG(symbol_table), "argv", sizeof("argv"), &arr, sizeof(zval *), NULL);
zend_hash_update(&EG(symbol_table), "argc", sizeof("argc"), &argc, sizeof(zval *), NULL);
zend_hash_add(&EG(symbol_table), "argc", sizeof("argc"), &argc, sizeof(zval *), NULL);
}
if (track_vars_array) {
Z_ADDREF_P(arr);
+4 -4
View File
@@ -2,7 +2,7 @@
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 4
#define PHP_RELEASE_VERSION 28
#define PHP_EXTRA_VERSION "RC1"
#define PHP_VERSION "5.4.28RC1"
#define PHP_VERSION_ID 50428
#define PHP_RELEASE_VERSION 27
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "5.4.27"
#define PHP_VERSION_ID 50427
+2 -11
View File
@@ -736,10 +736,6 @@ PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t size TSRMLS
if (!stream->readfilters.head && (stream->flags & PHP_STREAM_FLAG_NO_BUFFER || stream->chunk_size == 1)) {
toread = stream->ops->read(stream, buf, size TSRMLS_CC);
if (toread == (size_t) -1) {
/* e.g. underlying read(2) returned -1 */
break;
}
} else {
php_stream_fill_read_buffer(stream, size TSRMLS_CC);
@@ -1405,16 +1401,11 @@ PHPAPI size_t _php_stream_passthru(php_stream * stream STREAMS_DC TSRMLS_DC)
p = php_stream_mmap_range(stream, php_stream_tell(stream), PHP_STREAM_MMAP_ALL, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped);
if (p) {
do {
/* output functions return int, so pass in int max */
if (0 < (b = PHPWRITE(p, MIN(mapped - bcount, INT_MAX)))) {
bcount += b;
}
} while (b > 0 && mapped > bcount);
PHPWRITE(p, mapped);
php_stream_mmap_unmap_ex(stream, mapped);
return bcount;
return mapped;
}
}
+1 -2
View File
@@ -588,8 +588,7 @@ static inline int php_tcp_sockop_bind(php_stream *stream, php_netstream_data_t *
parse_unix_address(xparam, &unix_addr TSRMLS_CC);
return bind(sock->socket, (const struct sockaddr *)&unix_addr,
(socklen_t) XtOffsetOf(struct sockaddr_un, sun_path) + xparam->inputs.namelen);
return bind(sock->socket, (struct sockaddr *)&unix_addr, sizeof(unix_addr));
}
#endif
+2 -2
View File
@@ -573,7 +573,7 @@ html_errors = On
; http://php.net/error-log
; Example:
;error_log = php_errors.log
; Log errors to syslog (Event Log on Windows).
; Log errors to syslog (Event Log on NT, not valid in Windows 95).
;error_log = syslog
;windows.show_crt_warning
@@ -1010,7 +1010,7 @@ mail.add_x_header = On
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
; Log mail to syslog (Event Log on NT, not valid in Windows 95).
;mail.log = syslog
[SQL]
+2 -2
View File
@@ -573,7 +573,7 @@ html_errors = On
; http://php.net/error-log
; Example:
;error_log = php_errors.log
; Log errors to syslog (Event Log on Windows).
; Log errors to syslog (Event Log on NT, not valid in Windows 95).
;error_log = syslog
;windows.show_crt_warning
@@ -1010,7 +1010,7 @@ mail.add_x_header = On
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
; Log mail to syslog (Event Log on NT, not valid in Windows 95).
;mail.log = syslog
[SQL]
+1 -1
View File
@@ -670,7 +670,7 @@ zend_first_try {
}
apr_table_set(r->notes, "mod_php_memory_usage",
apr_psprintf(ctx->r->pool, "%" APR_SIZE_T_FMT, zend_memory_peak_usage(1 TSRMLS_CC)));
apr_psprintf(ctx->r->pool, "%zu", zend_memory_peak_usage(1 TSRMLS_CC)));
}
} zend_end_try();
-2
View File
@@ -3,8 +3,6 @@
ARG_ENABLE('embed', 'Embedded SAPI library', 'no');
var PHP_EMBED_PGO = false;
if (PHP_EMBED != "no") {
SAPI('embed', 'php_embed.c', 'php' + PHP_VERSION + 'embed.lib');
PHP_INSTALL_HEADERS("sapi/embed", "php_embed.h");
+1 -1
View File
@@ -185,7 +185,7 @@ listen = 127.0.0.1:9000
; - The pool processes will inherit the master process priority
; unless it specified otherwise
; Default Value: no set
; process.priority = -19
; priority = -19
; Choose how the process manager will control the number of child processes.
; Possible Values:
+4 -4
View File
@@ -250,13 +250,13 @@ if (PHP_DEBUG == "yes" && PHP_ZTS == "yes") {
// CFLAGS, LDFLAGS and BUILD_DIR are defined
// Add compiler and link flags if PGO options are selected
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
ADD_FLAG('DLL_LDFLAGS', "/LTCG:PGINSTRUMENT");
ADD_FLAG("STATIC_EXT_CFLAGS", "/GL /O2");
ADD_FLAG('CFLAGS', "/GL /O2");
ADD_FLAG('LDFLAGS', "/LTCG:PGINSTRUMENT");
DEFINE("PGOPGD_DIR", "$(BUILD_DIR)");
}
else if (PHP_DEBUG != "yes" && PHP_PGO != "no") {
ADD_FLAG('DLL_LDFLAGS', "/LTCG:PGUPDATE");
ADD_FLAG("STATIC_EXT_CFLAGS", "/GL /O2");
ADD_FLAG('CFLAGS', "/GL /O2");
ADD_FLAG('LDFLAGS', "/LTCG:PGUPDATE");
DEFINE("PGOPGD_DIR", ((PHP_PGO.length == 0 || PHP_PGO == "yes") ? "$(BUILD_DIR)" : PHP_PGO));
}
Loaded 100 of 102 files, more files were not shown because too many files have changed in this diff. Show more