mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-12 19:50:50 +00:00
Compare commits
123
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58a3e9586b | ||
|
|
61b002b91b | ||
|
|
4344eea421 | ||
|
|
6ee05d3f6b | ||
|
|
da80c3b62f | ||
|
|
8db1ba94e4 | ||
|
|
b8d029435d | ||
|
|
b727934591 | ||
|
|
eea75e7146 | ||
|
|
793f67e852 | ||
|
|
24b72e7a27 | ||
|
|
8bc82718ae | ||
|
|
a186312832 | ||
|
|
56f9727305 | ||
|
|
22acea99ff | ||
|
|
5b8c4b8de5 | ||
|
|
ed4de188dd | ||
|
|
7f43aeb167 | ||
|
|
ad1b9eef98 | ||
|
|
40a9316dff | ||
|
|
dae70a2ff7 | ||
|
|
f6db1057fd | ||
|
|
4268504084 | ||
|
|
57d657987d | ||
|
|
95c57bb646 | ||
|
|
6e81f80a1e | ||
|
|
b80243aece | ||
|
|
9bba219c75 | ||
|
|
5e66ce9293 | ||
|
|
30ec1c0051 | ||
|
|
b05c088a3a | ||
|
|
f1206aef70 | ||
|
|
5558d0db9b | ||
|
|
5811610d71 | ||
|
|
636adf251c | ||
|
|
df8e34bcc1 | ||
|
|
3a2660b302 | ||
|
|
733b09442d | ||
|
|
8c88b6e81c | ||
|
|
c5275b4a92 | ||
|
|
442264ffd6 | ||
|
|
fe72caa6e5 | ||
|
|
1010200da5 | ||
|
|
bf3edbada6 | ||
|
|
beda5093b4 | ||
|
|
191d9fc227 | ||
|
|
f07e37c96d | ||
|
|
2f3056fecc | ||
|
|
eca0644e0a | ||
|
|
1a4a9eede5 | ||
|
|
2876bde634 | ||
|
|
5a0da281e5 | ||
|
|
9302be3754 | ||
|
|
edd90e5ae3 | ||
|
|
e08172e0d5 | ||
|
|
1a0b80fe90 | ||
|
|
1c3ed86211 | ||
|
|
b78d1b901c | ||
|
|
49d46ad29e | ||
|
|
9540ced221 | ||
|
|
e00e4b9334 | ||
|
|
2c8aeda6dc | ||
|
|
287790d5c8 | ||
|
|
a95a6e93ee | ||
|
|
e8d6c6587d | ||
|
|
032921d80c | ||
|
|
4141ceb795 | ||
|
|
0ea731fc83 | ||
|
|
cc20351134 | ||
|
|
7a71f5d112 | ||
|
|
040194d6a0 | ||
|
|
ee1b807219 | ||
|
|
8b0d133b13 | ||
|
|
a3d6f28312 | ||
|
|
bbfda90d72 | ||
|
|
a0beddf5e9 | ||
|
|
c1f273908e | ||
|
|
7e5de3a1ce | ||
|
|
60ef357ffc | ||
|
|
bbd25ca01f | ||
|
|
d08b4dbf23 | ||
|
|
f17fe2cabc | ||
|
|
ba4fddd2da | ||
|
|
7ab5c593f7 | ||
|
|
9eb0c634d4 | ||
|
|
f453917f62 | ||
|
|
1ec83d44a1 | ||
|
|
68556f3384 | ||
|
|
af147ac9b7 | ||
|
|
91a9d24aa3 | ||
|
|
8e238148f9 | ||
|
|
eb84d5d0a6 | ||
|
|
f244513fc0 | ||
|
|
fca1501ed6 | ||
|
|
3cb056f523 | ||
|
|
60fb57d4f6 | ||
|
|
178eac6c98 | ||
|
|
fca331cae9 | ||
|
|
2c204a55af | ||
|
|
972c451c73 | ||
|
|
1283722589 | ||
|
|
84cd0f9911 | ||
|
|
89ea2650a1 | ||
|
|
039cb10fa3 | ||
|
|
170cf3ec00 | ||
|
|
8b7b67a21b | ||
|
|
84b0ab6d8f | ||
|
|
3616db6d38 | ||
|
|
4374a52e9d | ||
|
|
1df558c6a0 | ||
|
|
7477f5b387 | ||
|
|
223f7d9a44 | ||
|
|
6612e1ba6a | ||
|
|
8558640a6a | ||
|
|
76066b304c | ||
|
|
5efda763be | ||
|
|
17a57ad980 | ||
|
|
41b4b84dda | ||
|
|
059bc99d94 | ||
|
|
44fb74fad1 | ||
|
|
d63ed101ee | ||
|
|
c4145619be | ||
|
|
82a4f1a1a2 |
No files matched your search
@@ -1,5 +1,66 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
01 May 2014, PHP 5.5.12
|
||||
- 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 #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)
|
||||
. Fixed bug #67043 (substr_compare broke by previous change) (Tjerk)
|
||||
|
||||
- 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).
|
||||
. Fixed bug #67060 (possible privilege escalation due to insecure default configuration). (CVE-2014-0185) (christian at hoffie dot info)
|
||||
|
||||
- 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)
|
||||
|
||||
- mysqli:
|
||||
. Fixed problem in mysqli_commit()/mysqli_rollback() with second parameter
|
||||
(extra comma) and third parameters (lack of escaping). (Andrey)
|
||||
|
||||
- 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)
|
||||
|
||||
- SQLite:
|
||||
. Fixed bug #66967 (Updated bundled libsqlite to 3.8.4.3). (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.5.11
|
||||
|
||||
- Core:
|
||||
@@ -8,20 +69,22 @@ PHP NEWS
|
||||
|
||||
- SPL:
|
||||
. Added feature #65545 (SplFileObject::fread()) (Tjerk)
|
||||
. Fixed bug #66702 (RegexIterator::INVERT_MATCH does not invert). (Joshua
|
||||
Thijssen)
|
||||
|
||||
- cURL:
|
||||
. Fixed bug #66109 (Can't reset CURLOPT_CUSTOMREQUEST to default behaviour) (Tjerk)
|
||||
. Fix compilation on libcurl versions between 7.10.5 and 7.12.2, inclusive.
|
||||
(Adam)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66946i (fileinfo: extensive backtracking in awk rule regular
|
||||
expression). (CVE-2013-7345) (Remi)
|
||||
|
||||
- FPM:
|
||||
. Added clear_env configuration directive to disable clearenv() call.
|
||||
(Github PR# 598, Paul Annesley)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66946 (fileinfo: extensive backtracking in awk rule regular
|
||||
expression). (CVE-2013-7345) (Remi)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #66714 (imageconvolution breakage). (Brad Daily)
|
||||
. Fixed bug #66869 (Invalid 2nd argument crashes imageaffinematrixget) (Pierre)
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=5
|
||||
PHP_RELEASE_VERSION=11
|
||||
PHP_RELEASE_VERSION=12
|
||||
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`
|
||||
|
||||
@@ -248,6 +248,8 @@ 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();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+405
-386
@@ -1,4 +1,4 @@
|
||||
const timelib_tzdb_index_entry timezonedb_idx_builtin[579] = {
|
||||
const timelib_tzdb_index_entry timezonedb_idx_builtin[580] = {
|
||||
{ "Africa/Abidjan" , 0x000000 },
|
||||
{ "Africa/Accra" , 0x000055 },
|
||||
{ "Africa/Addis_Ababa" , 0x0000FD },
|
||||
@@ -227,360 +227,361 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[579] = {
|
||||
{ "Antarctica/Rothera" , 0x01848C },
|
||||
{ "Antarctica/South_Pole" , 0x018502 },
|
||||
{ "Antarctica/Syowa" , 0x018880 },
|
||||
{ "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 },
|
||||
{ "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 },
|
||||
};
|
||||
/* This is a generated file, do not modify */
|
||||
const unsigned char timelib_timezone_db_data_builtin[261637] = {
|
||||
const unsigned char timelib_timezone_db_data_builtin[261880] = {
|
||||
|
||||
|
||||
/* Africa/Abidjan */
|
||||
@@ -7452,6 +7453,38 @@ const unsigned char timelib_timezone_db_data_builtin[261637] = {
|
||||
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,
|
||||
@@ -14951,9 +14984,9 @@ const unsigned char timelib_timezone_db_data_builtin[261637] = {
|
||||
0xAA, 0x01, 0x2E, 0xC2, 0x82, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
/* Europe/Simferopol */
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
@@ -14972,36 +15005,22 @@ const unsigned char timelib_timezone_db_data_builtin[261637] = {
|
||||
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, 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,
|
||||
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,
|
||||
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, 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,
|
||||
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,
|
||||
|
||||
/* Europe/Skopje */
|
||||
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -18416,4 +18435,4 @@ const unsigned char timelib_timezone_db_data_builtin[261637] = {
|
||||
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.1", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
|
||||
const timelib_tzdb timezonedb_builtin = { "2014.2", 580, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
|
||||
@@ -2781,6 +2781,10 @@ 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;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--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
|
||||
@@ -1509,6 +1509,12 @@ 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
|
||||
|
||||
@@ -493,12 +493,14 @@ apprentice_unmap(struct magic_map *map)
|
||||
if (map == NULL)
|
||||
return;
|
||||
if (map->p != php_magic_database) {
|
||||
int j;
|
||||
for (j = 0; j < MAGIC_SETS; j++) {
|
||||
if (map->magic[j])
|
||||
efree(map->magic[j]);
|
||||
}
|
||||
if (map->p != NULL) {
|
||||
if (map->p == NULL) {
|
||||
int j;
|
||||
for (j = 0; j < MAGIC_SETS; j++) {
|
||||
if (map->magic[j]) {
|
||||
efree(map->magic[j]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
efree(map->p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
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,4 +1,3 @@
|
||||
// $Id$
|
||||
// vim:ft=javascript
|
||||
|
||||
ARG_WITH("interbase", "InterBase support", "no");
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef PHP_IBASE_INCLUDES_H
|
||||
#define PHP_IBASE_INCLUDES_H
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $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
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef PHP_INTERBASE_H
|
||||
#define PHP_INTERBASE_H
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php /* $Id$ */
|
||||
<?php
|
||||
|
||||
srand((double)microtime()*1000000);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php /* $Id$ */
|
||||
<?php
|
||||
|
||||
if (!extension_loaded("interbase")) print "skip interbase extension not available";
|
||||
require("interbase.inc");
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
--TEST--
|
||||
Bug #62070: Collator::getSortKey() returns garbage
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('intl'))
|
||||
die('skip intl extension not enabled');
|
||||
if (version_compare(INTL_ICU_VERSION, '49') < 0)
|
||||
die('skip ICU >= 49 only');
|
||||
<?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'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$s1 = 'Hello';
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--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,8 +1,9 @@
|
||||
--TEST--
|
||||
create() icu >= 4.8
|
||||
create() icu >= 4.8 && icu < 53.1
|
||||
--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, '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'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
--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
|
||||
@@ -3,6 +3,7 @@ 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
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
--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
|
||||
@@ -359,40 +359,40 @@ Formatted DateTime is : 20091231 03:02 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'America/Los_Angeles',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : Saturday, December 30, 2000 5:04:05 PM GMT-10:00
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'America/Los_Angeles',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : December 30, 2000 5:04:05 PM GMT-10:00
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'America/Los_Angeles',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : Dec 30, 2000 5:04:05 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'America/Los_Angeles',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : 12/30/00 5:04 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'America/Los_Angeles',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : 20001230 05:04 PM
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
datefmt_format_code()
|
||||
--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, '51.2') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU >= 51.2 && ICU < 52.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,423 @@
|
||||
--TEST--
|
||||
datefmt_format_code()
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '52.1') < 0) die('skip for ICU >= 52.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//ini_set("intl.error_level", E_WARNING);
|
||||
|
||||
/*
|
||||
* Test for the datefmt_format function
|
||||
*/
|
||||
|
||||
|
||||
function ut_main()
|
||||
{
|
||||
$timezone = 'GMT-10:00';
|
||||
|
||||
$locale_arr = array (
|
||||
'en_US'
|
||||
);
|
||||
|
||||
$datetype_arr = array (
|
||||
IntlDateFormatter::FULL,
|
||||
IntlDateFormatter::LONG,
|
||||
IntlDateFormatter::MEDIUM,
|
||||
IntlDateFormatter::SHORT,
|
||||
IntlDateFormatter::NONE
|
||||
);
|
||||
|
||||
$res_str = '';
|
||||
|
||||
|
||||
$time_arr = array (
|
||||
0,
|
||||
-1200000,
|
||||
1200000,
|
||||
2200000000.0,
|
||||
-2200000000.0,
|
||||
90099999,
|
||||
3600,
|
||||
-3600
|
||||
);
|
||||
|
||||
$localtime_arr1 = array (
|
||||
'tm_sec' => 24 ,
|
||||
'tm_min' => 3,
|
||||
'tm_hour' => 19,
|
||||
'tm_mday' => 3,
|
||||
'tm_mon' => 3,
|
||||
'tm_year' => 105,
|
||||
);
|
||||
$localtime_arr2 = array (
|
||||
'tm_sec' => 21,
|
||||
'tm_min' => 5,
|
||||
'tm_hour' => 7,
|
||||
'tm_mday' => 13,
|
||||
'tm_mon' => 4,
|
||||
'tm_year' => 205,
|
||||
);
|
||||
$localtime_arr3 = array (
|
||||
'tm_sec' => 11,
|
||||
'tm_min' => 13,
|
||||
'tm_hour' => 0,
|
||||
'tm_mday' => 17,
|
||||
'tm_mon' => 11,
|
||||
'tm_year' => -5
|
||||
);
|
||||
|
||||
$localtime_arr = array (
|
||||
$localtime_arr1,
|
||||
$localtime_arr2,
|
||||
$localtime_arr3
|
||||
);
|
||||
|
||||
$d1 = new DateTime("2010-01-01 01:02:03", new DateTimeZone("UTC"));
|
||||
$d2 = new DateTime("2000-12-31 03:04:05", new DateTimeZone("UTC"));
|
||||
$d2->setTimezone(new DateTimeZone("PDT"));
|
||||
$dates = array(
|
||||
$d1,
|
||||
$d2,
|
||||
new StdClass(),
|
||||
);
|
||||
|
||||
//Test format with input as a timestamp : integer
|
||||
foreach( $time_arr as $timestamp_entry){
|
||||
$res_str .= "\n------------\n";
|
||||
$res_str .= "\nInput timestamp is : $timestamp_entry";
|
||||
$res_str .= "\n------------\n";
|
||||
foreach( $locale_arr as $locale_entry ){
|
||||
foreach( $datetype_arr as $datetype_entry )
|
||||
{
|
||||
$res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry ";
|
||||
$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN);
|
||||
$formatted = ut_datefmt_format( $fmt , $timestamp_entry);
|
||||
$res_str .= "\nFormatted timestamp is : $formatted";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Test format with input as a localtime :array
|
||||
foreach( $localtime_arr as $localtime_entry){
|
||||
$res_str .= "\n------------\n";
|
||||
$res_str .= "\nInput localtime is : ";
|
||||
foreach( $localtime_entry as $key => $value){
|
||||
$res_str .= "$key : '$value' , ";
|
||||
}
|
||||
|
||||
$res_str .= "\n------------\n";
|
||||
foreach( $locale_arr as $locale_entry ){
|
||||
foreach( $datetype_arr as $datetype_entry )
|
||||
{
|
||||
$res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry ";
|
||||
$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN );
|
||||
$formatted1 = ut_datefmt_format( $fmt , $localtime_entry);
|
||||
if( intl_get_error_code() == U_ZERO_ERROR){
|
||||
$res_str .= "\nFormatted localtime_array is : $formatted1";
|
||||
}else{
|
||||
$res_str .= "\nError while formatting as: '".intl_get_error_message()."'";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($dates as $date_entry) {
|
||||
foreach( $locale_arr as $locale_entry ){
|
||||
foreach( $datetype_arr as $datetype_entry ) {
|
||||
$res_str .= "\n------------";
|
||||
$res_str .= "\nDate is: ".var_export($date_entry, true);
|
||||
$res_str .= "\n------------";
|
||||
|
||||
$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN );
|
||||
$formatted1 = ut_datefmt_format( $fmt , $date_entry);
|
||||
if( intl_get_error_code() == U_ZERO_ERROR){
|
||||
$res_str .= "\nFormatted DateTime is : $formatted1";
|
||||
}else{
|
||||
$res_str .= "\nError while formatting as: '".intl_get_error_message()."'";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $res_str;
|
||||
|
||||
}
|
||||
|
||||
include_once( 'ut_common.inc' );
|
||||
|
||||
// Run the test
|
||||
ut_run();
|
||||
?>
|
||||
--EXPECT--
|
||||
------------
|
||||
|
||||
Input timestamp is : 0
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Wednesday, December 31, 1969 at 2:00:00 PM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : December 31, 1969 at 2:00:00 PM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Dec 31, 1969, 2:00:00 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 12/31/69, 2:00 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 19691231 02:00 PM
|
||||
------------
|
||||
|
||||
Input timestamp is : -1200000
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Wednesday, December 17, 1969 at 4:40:00 PM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : December 17, 1969 at 4:40:00 PM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Dec 17, 1969, 4:40:00 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 12/17/69, 4:40 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 19691217 04:40 PM
|
||||
------------
|
||||
|
||||
Input timestamp is : 1200000
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Wednesday, January 14, 1970 at 11:20:00 AM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : January 14, 1970 at 11:20:00 AM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Jan 14, 1970, 11:20:00 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 1/14/70, 11:20 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 19700114 11:20 AM
|
||||
------------
|
||||
|
||||
Input timestamp is : 2200000000
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Sunday, September 18, 2039 at 1:06:40 PM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : September 18, 2039 at 1:06:40 PM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Sep 18, 2039, 1:06:40 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 9/18/39, 1:06 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 20390918 01:06 PM
|
||||
------------
|
||||
|
||||
Input timestamp is : -2200000000
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Saturday, April 14, 1900 at 2:53:20 PM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : April 14, 1900 at 2:53:20 PM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Apr 14, 1900, 2:53:20 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 4/14/00, 2:53 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 19000414 02:53 PM
|
||||
------------
|
||||
|
||||
Input timestamp is : 90099999
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Wednesday, November 8, 1972 at 9:46:39 AM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : November 8, 1972 at 9:46:39 AM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Nov 8, 1972, 9:46:39 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 11/8/72, 9:46 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 19721108 09:46 AM
|
||||
------------
|
||||
|
||||
Input timestamp is : 3600
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Wednesday, December 31, 1969 at 3:00:00 PM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : December 31, 1969 at 3:00:00 PM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Dec 31, 1969, 3:00:00 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 12/31/69, 3:00 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 19691231 03:00 PM
|
||||
------------
|
||||
|
||||
Input timestamp is : -3600
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted timestamp is : Wednesday, December 31, 1969 at 1:00:00 PM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted timestamp is : December 31, 1969 at 1:00:00 PM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted timestamp is : Dec 31, 1969, 1:00:00 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted timestamp is : 12/31/69, 1:00 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted timestamp is : 19691231 01:00 PM
|
||||
------------
|
||||
|
||||
Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' ,
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted localtime_array is : Sunday, April 3, 2005 at 7:03:24 PM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted localtime_array is : April 3, 2005 at 7:03:24 PM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted localtime_array is : Apr 3, 2005, 7:03:24 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted localtime_array is : 4/3/05, 7:03 PM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted localtime_array is : 20050403 07:03 PM
|
||||
------------
|
||||
|
||||
Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' ,
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted localtime_array is : Wednesday, May 13, 2105 at 7:05:21 AM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted localtime_array is : May 13, 2105 at 7:05:21 AM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted localtime_array is : May 13, 2105, 7:05:21 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted localtime_array is : 5/13/05, 7:05 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted localtime_array is : 21050513 07:05 AM
|
||||
------------
|
||||
|
||||
Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' ,
|
||||
------------
|
||||
|
||||
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
|
||||
Formatted localtime_array is : Tuesday, December 17, 1895 at 12:13:11 AM GMT-10:00
|
||||
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
|
||||
Formatted localtime_array is : December 17, 1895 at 12:13:11 AM GMT-10
|
||||
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
|
||||
Formatted localtime_array is : Dec 17, 1895, 12:13:11 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
|
||||
Formatted localtime_array is : 12/17/95, 12:13 AM
|
||||
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
|
||||
Formatted localtime_array is : 18951217 12:13 AM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2010-01-01 01:02:03',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'UTC',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : Thursday, December 31, 2009 at 3:02:03 PM GMT-10:00
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2010-01-01 01:02:03',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'UTC',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : December 31, 2009 at 3:02:03 PM GMT-10
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2010-01-01 01:02:03',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'UTC',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : Dec 31, 2009, 3:02:03 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2010-01-01 01:02:03',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'UTC',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : 12/31/09, 3:02 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2010-01-01 01:02:03',
|
||||
'timezone_type' => 3,
|
||||
'timezone' => 'UTC',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : 20091231 03:02 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : Saturday, December 30, 2000 at 5:04:05 PM GMT-10:00
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : December 30, 2000 at 5:04:05 PM GMT-10
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : Dec 30, 2000, 5:04:05 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : 12/30/00, 5:04 PM
|
||||
------------
|
||||
Date is: DateTime::__set_state(array(
|
||||
'date' => '2000-12-30 19:04:05',
|
||||
'timezone_type' => 2,
|
||||
'timezone' => 'PDT',
|
||||
))
|
||||
------------
|
||||
Formatted DateTime is : 20001230 05:04 PM
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
@@ -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) print 'skip'; ?>
|
||||
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
--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 zweihundertvierunddreißigtausendfünfhundertsiebenundsechzig 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!
|
||||
@@ -0,0 +1,130 @@
|
||||
--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 zweihundertvierunddreißigtausendfünfhundertsiebenundsechzig 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'
|
||||
@@ -2,7 +2,7 @@
|
||||
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) die('skip for ICU >= 51.2'); ?>
|
||||
<?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
|
||||
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
--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#
|
||||
-----------------
|
||||
@@ -0,0 +1,342 @@
|
||||
--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#
|
||||
-----------------
|
||||
@@ -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) print 'skip'; ?>
|
||||
<?php if(version_compare(INTL_ICU_VERSION, '49') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,275 @@
|
||||
--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=
|
||||
-----------------
|
||||
@@ -26,7 +26,7 @@ do_test(IntlTimeZone::createTimeZone('GMT+0405'), true);
|
||||
--EXPECTF--
|
||||
string(3) "CET"
|
||||
int(3600000)
|
||||
string(13) "Europe/Berlin"
|
||||
string(%d) "%rEurope\/Berlin|CET%r"
|
||||
int(3600)
|
||||
string(16) "Europe/Amsterdam"
|
||||
int(3600000)
|
||||
|
||||
+10
-8
@@ -230,7 +230,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;
|
||||
int i, r, need_comma = 0;
|
||||
HashTable *myht;
|
||||
|
||||
if (Z_TYPE_PP(val) == IS_ARRAY) {
|
||||
@@ -253,7 +253,6 @@ 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;
|
||||
@@ -266,7 +265,6 @@ 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)) {
|
||||
@@ -283,11 +281,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) {
|
||||
@@ -302,11 +300,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);
|
||||
@@ -318,11 +316,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, '"');
|
||||
@@ -347,8 +345,12 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
|
||||
JSON_G(error_code) = PHP_JSON_ERROR_DEPTH;
|
||||
}
|
||||
--JSON_G(encoder_depth);
|
||||
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
|
||||
json_pretty_print_indent(buf, options TSRMLS_CC);
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
if (r == PHP_JSON_OUTPUT_ARRAY) {
|
||||
smart_str_appendc(buf, ']');
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--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--
|
||||
[
|
||||
[],
|
||||
{},
|
||||
{}
|
||||
]
|
||||
@@ -399,6 +399,16 @@ 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) {
|
||||
|
||||
+108
-60
@@ -34,6 +34,111 @@
|
||||
#include "php_mysqli_structs.h"
|
||||
#include "mysqli_priv.h"
|
||||
|
||||
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
/* {{{ mysqli_tx_cor_options_to_string */
|
||||
static void mysqli_tx_cor_options_to_string(const MYSQL * const conn, smart_str * str, const unsigned int mode)
|
||||
{
|
||||
if (mode & TRANS_COR_AND_CHAIN && !(mode & TRANS_COR_AND_NO_CHAIN)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND CHAIN", sizeof("AND CHAIN") - 1);
|
||||
} else if (mode & TRANS_COR_AND_NO_CHAIN && !(mode & TRANS_COR_AND_CHAIN)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND NO CHAIN", sizeof("AND NO CHAIN") - 1);
|
||||
}
|
||||
|
||||
if (mode & TRANS_COR_RELEASE && !(mode & TRANS_COR_NO_RELEASE)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "RELEASE", sizeof("RELEASE") - 1);
|
||||
} else if (mode & TRANS_COR_NO_RELEASE && !(mode & TRANS_COR_RELEASE)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "NO RELEASE", sizeof("NO RELEASE") - 1);
|
||||
}
|
||||
smart_str_0(str);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ mysqlnd_escape_string_for_tx_name_in_comment */
|
||||
char *
|
||||
mysqli_escape_string_for_tx_name_in_comment(const char * const name TSRMLS_DC)
|
||||
{
|
||||
char * ret = NULL;
|
||||
if (name) {
|
||||
zend_bool warned = FALSE;
|
||||
const char * p_orig = name;
|
||||
char * p_copy;
|
||||
p_copy = ret = emalloc(strlen(name) + 1 + 2 + 2 + 1); /* space, open, close, NullS */
|
||||
*p_copy++ = ' ';
|
||||
*p_copy++ = '/';
|
||||
*p_copy++ = '*';
|
||||
while (1) {
|
||||
register char v = *p_orig;
|
||||
if (v == 0) {
|
||||
break;
|
||||
}
|
||||
if ((v >= '0' && v <= '9') ||
|
||||
(v >= 'a' && v <= 'z') ||
|
||||
(v >= 'A' && v <= 'Z') ||
|
||||
v == '-' ||
|
||||
v == '_' ||
|
||||
v == ' ' ||
|
||||
v == '=')
|
||||
{
|
||||
*p_copy++ = v;
|
||||
} else if (warned == FALSE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Transaction name truncated. Must be only [0-9A-Za-z\\-_=]+");
|
||||
warned = TRUE;
|
||||
}
|
||||
++p_orig;
|
||||
}
|
||||
*p_copy++ = '*';
|
||||
*p_copy++ = '/';
|
||||
*p_copy++ = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool mysqli_commit_or_rollback_libmysql */
|
||||
static int mysqli_commit_or_rollback_libmysql(MYSQL * conn, zend_bool commit, const unsigned int mode, const char * const name TSRMLS_DC)
|
||||
{
|
||||
int ret;
|
||||
smart_str tmp_str = {0, 0, 0};
|
||||
mysqli_tx_cor_options_to_string(conn, &tmp_str, mode);
|
||||
smart_str_0(&tmp_str);
|
||||
|
||||
{
|
||||
char * query;
|
||||
char * name_esc = mysqli_escape_string_for_tx_name_in_comment(name TSRMLS_CC);
|
||||
size_t query_len;
|
||||
|
||||
query_len = spprintf(&query, 0, (commit? "COMMIT%s %s":"ROLLBACK%s %s"),
|
||||
name_esc? name_esc:"", tmp_str.c? tmp_str.c:"");
|
||||
smart_str_free(&tmp_str);
|
||||
if (name_esc) {
|
||||
efree(name_esc);
|
||||
name_esc = NULL;
|
||||
}
|
||||
|
||||
ret = mysql_real_query(conn, query, query_len);
|
||||
efree(query);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
|
||||
/* {{{ proto mixed mysqli_affected_rows(object link)
|
||||
Get number of affected rows in previous MySQL operation */
|
||||
PHP_FUNCTION(mysqli_affected_rows)
|
||||
@@ -637,66 +742,9 @@ PHP_FUNCTION(mysqli_close)
|
||||
/* }}} */
|
||||
|
||||
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
/* {{{ mysqli_tx_cor_options_to_string */
|
||||
static void mysqli_tx_cor_options_to_string(const MYSQL * const conn, smart_str * str, const unsigned int mode)
|
||||
{
|
||||
if (mode & TRANS_COR_AND_CHAIN && !(mode & TRANS_COR_AND_NO_CHAIN)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND CHAIN", sizeof("AND CHAIN") - 1);
|
||||
} else if (mode & TRANS_COR_AND_NO_CHAIN && !(mode & TRANS_COR_AND_CHAIN)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND NO CHAIN", sizeof("AND NO CHAIN") - 1);
|
||||
}
|
||||
|
||||
if (mode & TRANS_COR_RELEASE && !(mode & TRANS_COR_NO_RELEASE)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "RELEASE", sizeof("RELEASE") - 1);
|
||||
} else if (mode & TRANS_COR_NO_RELEASE && !(mode & TRANS_COR_RELEASE)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "NO RELEASE", sizeof("NO RELEASE") - 1);
|
||||
}
|
||||
smart_str_0(str);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool mysqli_commit_or_rollback_libmysql */
|
||||
static int mysqli_commit_or_rollback_libmysql(MYSQL * conn, zend_bool commit, const unsigned int mode, const char * const name)
|
||||
{
|
||||
int ret;
|
||||
smart_str tmp_str = {0, 0, 0};
|
||||
mysqli_tx_cor_options_to_string(conn, &tmp_str, mode);
|
||||
smart_str_0(&tmp_str);
|
||||
|
||||
{
|
||||
char * commented_name = NULL;
|
||||
unsigned int commented_name_len = name? spprintf(&commented_name, 0, " /*%s*/", name):0;
|
||||
char * query;
|
||||
unsigned int query_len = spprintf(&query, 0, (commit? "COMMIT%s %s":"ROLLBACK%s %s"),
|
||||
commented_name? commented_name:"", tmp_str.c? tmp_str.c:"");
|
||||
smart_str_free(&tmp_str);
|
||||
|
||||
ret = mysql_real_query(conn, query, query_len);
|
||||
efree(query);
|
||||
if (commented_name) {
|
||||
efree(commented_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
|
||||
/* {{{ proto bool mysqli_commit(object link)
|
||||
/* {{{ proto bool mysqli_commit(object link[, int flags [, string name ]])
|
||||
Commit outstanding actions and close transaction */
|
||||
PHP_FUNCTION(mysqli_commit)
|
||||
{
|
||||
@@ -712,7 +760,7 @@ PHP_FUNCTION(mysqli_commit)
|
||||
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
|
||||
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
if (mysqli_commit_or_rollback_libmysql(mysql->mysql, TRUE, flags, name)) {
|
||||
if (mysqli_commit_or_rollback_libmysql(mysql->mysql, TRUE, flags, name TSRMLS_CC)) {
|
||||
#else
|
||||
if (FAIL == mysqlnd_commit(mysql->mysql, flags, name)) {
|
||||
#endif
|
||||
@@ -1962,7 +2010,7 @@ PHP_FUNCTION(mysqli_rollback)
|
||||
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
|
||||
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
if (mysqli_commit_or_rollback_libmysql(mysql->mysql, FALSE, flags, name)) {
|
||||
if (mysqli_commit_or_rollback_libmysql(mysql->mysql, FALSE, flags, name TSRMLS_CC)) {
|
||||
#else
|
||||
if (FAIL == mysqlnd_rollback(mysql->mysql, flags, name)) {
|
||||
#endif
|
||||
|
||||
+26
-20
@@ -1046,12 +1046,14 @@ PHP_FUNCTION(mysqli_get_charset)
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
extern char * mysqli_escape_string_for_tx_name_in_comment(const char * const name TSRMLS_DC);
|
||||
|
||||
/* {{{ proto bool mysqli_begin_transaction_libmysql */
|
||||
static int mysqli_begin_transaction_libmysql(MYSQL * conn, const unsigned int mode, const char * const name)
|
||||
static int mysqli_begin_transaction_libmysql(MYSQL * conn, const unsigned int mode, const char * const name TSRMLS_DC)
|
||||
{
|
||||
int ret;
|
||||
zend_bool err = FALSE;
|
||||
smart_str tmp_str = {0, 0, 0};
|
||||
if (mode & TRANS_START_WITH_CONSISTENT_SNAPSHOT) {
|
||||
if (tmp_str.len) {
|
||||
@@ -1059,33 +1061,37 @@ static int mysqli_begin_transaction_libmysql(MYSQL * conn, const unsigned int mo
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "WITH CONSISTENT SNAPSHOT", sizeof("WITH CONSISTENT SNAPSHOT") - 1);
|
||||
}
|
||||
if (mode & TRANS_START_READ_WRITE) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
if (mode & (TRANS_START_READ_WRITE | TRANS_START_READ_ONLY)) {
|
||||
if (mysql_get_server_version(conn) < 50605L) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "This server version doesn't support 'READ WRITE' and 'READ ONLY'. Minimum 5.6.5 is required");
|
||||
err = TRUE;
|
||||
} else if (mode & TRANS_START_READ_WRITE) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1);
|
||||
} else if (mode & TRANS_START_READ_ONLY) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1);
|
||||
}
|
||||
if (mode & TRANS_START_READ_ONLY) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1);
|
||||
}
|
||||
smart_str_0(&tmp_str);
|
||||
|
||||
{
|
||||
char * commented_name = NULL;
|
||||
unsigned int commented_name_len = name? spprintf(&commented_name, 0, " /*%s*/", name):0;
|
||||
if (err == FALSE){
|
||||
char * name_esc = mysqli_escape_string_for_tx_name_in_comment(name TSRMLS_CC);
|
||||
char * query;
|
||||
unsigned int query_len = spprintf(&query, 0, "START TRANSACTION%s %s",
|
||||
commented_name? commented_name:"", tmp_str.c? tmp_str.c:"");
|
||||
name_esc? name_esc:"", tmp_str.c? tmp_str.c:"");
|
||||
|
||||
smart_str_free(&tmp_str);
|
||||
if (name_esc) {
|
||||
efree(name_esc);
|
||||
}
|
||||
|
||||
ret = mysql_real_query(conn, query, query_len);
|
||||
efree(query);
|
||||
if (commented_name) {
|
||||
efree(commented_name);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -1120,7 +1126,7 @@ PHP_FUNCTION(mysqli_begin_transaction)
|
||||
}
|
||||
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
if (mysqli_begin_transaction_libmysql(mysql->mysql, flags, name)) {
|
||||
if (mysqli_begin_transaction_libmysql(mysql->mysql, flags, name TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -67,61 +67,50 @@ if (!have_innodb($link))
|
||||
var_dump($res->fetch_assoc());
|
||||
|
||||
/* valid flags */
|
||||
$flags = array(
|
||||
MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT,
|
||||
MYSQLI_TRANS_START_READ_WRITE,
|
||||
MYSQLI_TRANS_START_READ_ONLY,
|
||||
MYSQLI_TRANS_COR_AND_CHAIN,
|
||||
MYSQLI_TRANS_COR_AND_NO_CHAIN,
|
||||
MYSQLI_TRANS_COR_RELEASE,
|
||||
MYSQLI_TRANS_COR_NO_RELEASE);
|
||||
$flags = array(MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT);
|
||||
|
||||
if (mysqli_get_server_version($link) >= 50605) {
|
||||
$flags[] = MYSQLI_TRANS_START_READ_WRITE;
|
||||
$flags[] = MYSQLI_TRANS_START_READ_ONLY;
|
||||
}
|
||||
|
||||
/* just coverage */
|
||||
foreach ($flags as $flag) {
|
||||
if (!mysqli_begin_transaction($link, $flag, sprintf("flag %d", $flag))) {
|
||||
printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
}
|
||||
if (!mysqli_query($link, 'SELECT * FROM test') ||
|
||||
!mysqli_rollback($link)) {
|
||||
if (!mysqli_query($link, 'SELECT * FROM test') || !mysqli_rollback($link)) {
|
||||
printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
}
|
||||
}
|
||||
|
||||
/* does it really set a flag? */
|
||||
if (mysqli_get_server_version($link) >= 50600) {
|
||||
if (mysqli_get_server_version($link) >= 50605) {
|
||||
if (!mysqli_begin_transaction($link, MYSQLI_TRANS_START_READ_ONLY, sprintf("flag %d", $flag))) {
|
||||
printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
}
|
||||
if (!mysqli_query($link, "INSERT INTO test(id) VALUES (2)") ||
|
||||
!mysqli_commit($link)) {
|
||||
if (mysqli_query($link, "INSERT INTO test(id) VALUES (2)")) {
|
||||
printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
} else if (!mysqli_commit($link)) {
|
||||
printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
} else {
|
||||
$res = mysqli_query($link, "SELECT id FROM test WHERE id = 2");
|
||||
var_dump($res->fetch_assoc());
|
||||
}
|
||||
}
|
||||
|
||||
/* invalid flag */
|
||||
do {
|
||||
$invalid_flag = mt_rand(0, 10000);
|
||||
} while (isset(array_flip($flags)[$invalid_flag]));
|
||||
/* we may or may not hit an invalid combination provoking a SQL error */
|
||||
if (!mysqli_begin_transaction($link, $invalid_flag, sprintf("flag %d", $invalid_flag))) {
|
||||
printf("[018] invalid_flag = %d [%d] %s\n", $invalid_flag, mysqli_errno($link), mysqli_error($link));
|
||||
} else {
|
||||
printf("[018] invalid_flag = %d [%d] %s\n", $invalid_flag, mysqli_errno($link), mysqli_error($link));
|
||||
}
|
||||
if (!mysqli_begin_transaction($link, -1)) {
|
||||
printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
}
|
||||
|
||||
/* does it like stupid names? */
|
||||
if (!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "*/trick me?\n\0"))
|
||||
printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
if (mysqli_get_server_version($link) >= 50605) {
|
||||
/* does it like stupid names? */
|
||||
if (@!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "*/trick me?\n\0"))
|
||||
printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
|
||||
/* does it like stupid names? */
|
||||
if (!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "az09"))
|
||||
printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
/* does it like stupid names? */
|
||||
if (@!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "az09"))
|
||||
printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
}
|
||||
|
||||
print "done!";
|
||||
?>
|
||||
@@ -131,10 +120,7 @@ if (!have_innodb($link))
|
||||
?>
|
||||
--EXPECTF--
|
||||
NULL
|
||||
[017] [1792] %s
|
||||
[018] invalid_flag = %d [%d]%A
|
||||
|
||||
Warning: mysqli_begin_transaction(): Invalid value for parameter flags (-1) in %s on line %d
|
||||
[019] [%d]%A
|
||||
[020] [%d]%A
|
||||
done!
|
||||
@@ -0,0 +1,119 @@
|
||||
--TEST--
|
||||
mysqli_change_user(), MySQL < 5.6
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifemb.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
|
||||
die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket));
|
||||
|
||||
if (mysqli_get_server_version($link) >= 50600)
|
||||
die("SKIP For MySQL < 5.6.0");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
$tmp = NULL;
|
||||
$link = NULL;
|
||||
|
||||
if (!is_null($tmp = @mysqli_change_user()))
|
||||
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!is_null($tmp = @mysqli_change_user($link)))
|
||||
printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!is_null($tmp = @mysqli_change_user($link, $link)))
|
||||
printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!is_null($tmp = @mysqli_change_user($link, $link, $link)))
|
||||
printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!is_null($tmp = @mysqli_change_user($link, $link, $link, $link, $link)))
|
||||
printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
|
||||
printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket);
|
||||
|
||||
if (false !== ($tmp = mysqli_change_user($link, $user . '_unknown_really', $passwd . 'non_empty', $db)))
|
||||
printf("[007] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (false !== ($tmp = mysqli_change_user($link, $user, $passwd . '_unknown_really', $db)))
|
||||
printf("[008] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (false !== ($tmp = mysqli_change_user($link, $user, $passwd, $db . '_unknown_really')))
|
||||
printf("[009] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!mysqli_query($link, 'SET @mysqli_change_user_test_var=1'))
|
||||
printf("[010] Failed to set test variable: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
|
||||
if (!$res = mysqli_query($link, 'SELECT @mysqli_change_user_test_var AS test_var'))
|
||||
printf("[011] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
$tmp = mysqli_fetch_assoc($res);
|
||||
mysqli_free_result($res);
|
||||
if (1 != $tmp['test_var'])
|
||||
printf("[012] Cannot set test variable\n");
|
||||
|
||||
if (true !== ($tmp = mysqli_change_user($link, $user, $passwd, $db)))
|
||||
printf("[013] Expecting true, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!$res = mysqli_query($link, 'SELECT database() AS dbname, user() AS user'))
|
||||
printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
$tmp = mysqli_fetch_assoc($res);
|
||||
mysqli_free_result($res);
|
||||
|
||||
if (substr($tmp['user'], 0, strlen($user)) !== $user)
|
||||
printf("[015] Expecting user %s, got user() %s\n", $user, $tmp['user']);
|
||||
if ($tmp['dbname'] != $db)
|
||||
printf("[016] Expecting database %s, got database() %s\n", $db, $tmp['dbname']);
|
||||
|
||||
if (!$res = mysqli_query($link, 'SELECT @mysqli_change_user_test_var AS test_var'))
|
||||
printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
$tmp = mysqli_fetch_assoc($res);
|
||||
mysqli_free_result($res);
|
||||
if (NULL !== $tmp['test_var'])
|
||||
printf("[019] Test variable is still set!\n");
|
||||
|
||||
mysqli_close($link);
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||
printf("[020] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket);
|
||||
}
|
||||
|
||||
if (false !== ($tmp = mysqli_change_user($link, str_repeat('user', 16384), str_repeat('pass', 16384), str_repeat('dbase', 16384))))
|
||||
printf("[021] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
mysqli_close($link);
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||
printf("[022] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket);
|
||||
}
|
||||
|
||||
/* silent protocol change if no db which requires workaround in mysqlnd/libmysql
|
||||
(empty db = no db send with COM_CHANGE_USER) */
|
||||
if (true !== ($tmp = mysqli_change_user($link, $user, $passwd, "")))
|
||||
printf("[023] Expecting true, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
if (!$res = mysqli_query($link, 'SELECT database() AS dbname, user() AS user'))
|
||||
printf("[024] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
|
||||
$tmp = mysqli_fetch_assoc($res);
|
||||
mysqli_free_result($res);
|
||||
|
||||
if ($tmp['dbname'] != "")
|
||||
printf("[025] Expecting database '', got database() '%s'\n", $tmp['dbname']);
|
||||
|
||||
mysqli_close($link);
|
||||
|
||||
if (NULL !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
|
||||
printf("[026] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
|
||||
print "done!";
|
||||
?>
|
||||
--EXPECTF--
|
||||
done!
|
||||
@@ -21,49 +21,78 @@ if (!have_innodb($link))
|
||||
$link = NULL;
|
||||
|
||||
$mysqli = new mysqli();
|
||||
if (!is_null($tmp = @$mysqli->commit()))
|
||||
if (!is_null($tmp = @$mysqli->commit())) {
|
||||
printf("[013] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
|
||||
}
|
||||
|
||||
if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
|
||||
if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) {
|
||||
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket);
|
||||
}
|
||||
|
||||
if (true !== ($tmp = $mysqli->commit()))
|
||||
if (true !== ($tmp = $mysqli->commit())) {
|
||||
printf("[002] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp);
|
||||
}
|
||||
|
||||
if (true !== ($tmp = $mysqli->autocommit(false)))
|
||||
if (true !== ($tmp = $mysqli->autocommit(false))) {
|
||||
printf("[003] Cannot turn off autocommit, expecting true, got %s/%s\n", gettype($tmp), $tmp);
|
||||
}
|
||||
|
||||
if (!$mysqli->query('DROP TABLE IF EXISTS test'))
|
||||
if (!$mysqli->query('DROP TABLE IF EXISTS test')) {
|
||||
printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
|
||||
if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB'))
|
||||
if (!$mysqli->query('CREATE TABLE test(id INT) ENGINE = InnoDB')) {
|
||||
printf("[005] Cannot create test table, [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
|
||||
if (!$mysqli->query('INSERT INTO test(id) VALUES (1)'))
|
||||
if (!$mysqli->query('INSERT INTO test(id) VALUES (1)')) {
|
||||
printf("[006] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
|
||||
$tmp = $mysqli->commit();
|
||||
if ($tmp !== true)
|
||||
if ($tmp !== true) {
|
||||
printf("[007] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
|
||||
}
|
||||
|
||||
if (!$mysqli->query('ROLLBACK'))
|
||||
printf("[008] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
|
||||
if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test'))
|
||||
if (!$res = $mysqli->query('SELECT COUNT(*) AS num FROM test')) {
|
||||
printf("[009] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
|
||||
$tmp = $res->fetch_assoc();
|
||||
if (1 != $tmp['num'])
|
||||
if (1 != $tmp['num']) {
|
||||
printf("[010] Expecting 1 row in table test, found %d rows\n", $tmp['num']);
|
||||
}
|
||||
$res->free();
|
||||
|
||||
if (!$mysqli->query('DROP TABLE IF EXISTS test'))
|
||||
if (!$mysqli->query('DROP TABLE IF EXISTS test')) {
|
||||
printf("[011] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
|
||||
if (!$mysqli->commit(0 , "tx_name0123")) {
|
||||
printf("[012] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
if (!$mysqli->commit(0 , "*/ nonsense")) {
|
||||
printf("[013] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
if (!$mysqli->commit(0 , "tx_name ulf вендел")) {
|
||||
printf("[014] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
if (!$mysqli->commit(0 , "tx_name \t\n\r\b")) {
|
||||
printf("[015] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
if (!$mysqli->commit(MYSQLI_TRANS_COR_AND_CHAIN | MYSQLI_TRANS_COR_NO_RELEASE , "tx_name")) {
|
||||
printf("[016] [%d] %s\n", $mysqli->errno, $mysqli->error);
|
||||
}
|
||||
|
||||
$mysqli->close();
|
||||
|
||||
if (NULL !== ($tmp = @$mysqli->commit()))
|
||||
printf("[012] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
if (NULL !== ($tmp = @$mysqli->commit())) {
|
||||
printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
|
||||
}
|
||||
|
||||
print "done!";
|
||||
?>
|
||||
@@ -72,4 +101,9 @@ if (!have_innodb($link))
|
||||
require_once("clean_table.inc");
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d
|
||||
|
||||
Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d
|
||||
|
||||
Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d
|
||||
done!
|
||||
+82
-31
@@ -2652,24 +2652,24 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_cor_options_to_string)(const MYSQLND_CONN_D
|
||||
{
|
||||
if (mode & TRANS_COR_AND_CHAIN && !(mode & TRANS_COR_AND_NO_CHAIN)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND CHAIN", sizeof("AND CHAIN") - 1);
|
||||
} else if (mode & TRANS_COR_AND_NO_CHAIN && !(mode & TRANS_COR_AND_CHAIN)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND NO CHAIN", sizeof("AND NO CHAIN") - 1);
|
||||
}
|
||||
|
||||
if (mode & TRANS_COR_RELEASE && !(mode & TRANS_COR_NO_RELEASE)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "RELEASE", sizeof("RELEASE") - 1);
|
||||
} else if (mode & TRANS_COR_NO_RELEASE && !(mode & TRANS_COR_RELEASE)) {
|
||||
if (str->len) {
|
||||
smart_str_appendl(str, ", ", sizeof(", ") - 1);
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "NO RELEASE", sizeof("NO RELEASE") - 1);
|
||||
}
|
||||
@@ -2678,6 +2678,49 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_cor_options_to_string)(const MYSQLND_CONN_D
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ mysqlnd_escape_string_for_tx_name_in_comment */
|
||||
static char *
|
||||
mysqlnd_escape_string_for_tx_name_in_comment(const char * const name TSRMLS_DC)
|
||||
{
|
||||
char * ret = NULL;
|
||||
DBG_ENTER("mysqlnd_escape_string_for_tx_name_in_comment");
|
||||
if (name) {
|
||||
zend_bool warned = FALSE;
|
||||
const char * p_orig = name;
|
||||
char * p_copy;
|
||||
p_copy = ret = mnd_emalloc(strlen(name) + 1 + 2 + 2 + 1); /* space, open, close, NullS */
|
||||
*p_copy++ = ' ';
|
||||
*p_copy++ = '/';
|
||||
*p_copy++ = '*';
|
||||
while (1) {
|
||||
register char v = *p_orig;
|
||||
if (v == 0) {
|
||||
break;
|
||||
}
|
||||
if ((v >= '0' && v <= '9') ||
|
||||
(v >= 'a' && v <= 'z') ||
|
||||
(v >= 'A' && v <= 'Z') ||
|
||||
v == '-' ||
|
||||
v == '_' ||
|
||||
v == ' ' ||
|
||||
v == '=')
|
||||
{
|
||||
*p_copy++ = v;
|
||||
} else if (warned == FALSE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Transaction name truncated. Must be only [0-9A-Za-z\\-_=]+");
|
||||
warned = TRUE;
|
||||
}
|
||||
++p_orig;
|
||||
}
|
||||
*p_copy++ = '*';
|
||||
*p_copy++ = '/';
|
||||
*p_copy++ = 0;
|
||||
}
|
||||
DBG_RETURN(ret);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ mysqlnd_conn_data::tx_commit_ex */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const zend_bool commit, const unsigned int flags, const char * const name TSRMLS_DC)
|
||||
@@ -2692,23 +2735,26 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * con
|
||||
conn->m->tx_cor_options_to_string(conn, &tmp_str, flags TSRMLS_CC);
|
||||
smart_str_0(&tmp_str);
|
||||
|
||||
{
|
||||
char * commented_name = NULL;
|
||||
unsigned int commented_name_len = name? mnd_sprintf(&commented_name, 0, " /*%s*/", name):0;
|
||||
char * query;
|
||||
unsigned int query_len = mnd_sprintf(&query, 0, (commit? "COMMIT%s %s":"ROLLBACK%s %s"),
|
||||
commented_name? commented_name:"", tmp_str.c? tmp_str.c:"");
|
||||
smart_str_free(&tmp_str);
|
||||
|
||||
{
|
||||
char * query;
|
||||
size_t query_len;
|
||||
char * name_esc = mysqlnd_escape_string_for_tx_name_in_comment(name TSRMLS_CC);
|
||||
|
||||
query_len = mnd_sprintf(&query, 0, (commit? "COMMIT%s %s":"ROLLBACK%s %s"),
|
||||
name_esc? name_esc:"", tmp_str.c? tmp_str.c:"");
|
||||
smart_str_free(&tmp_str);
|
||||
if (name_esc) {
|
||||
mnd_efree(name_esc);
|
||||
name_esc = NULL;
|
||||
}
|
||||
if (!query) {
|
||||
SET_OOM_ERROR(*conn->error_info);
|
||||
break;
|
||||
}
|
||||
|
||||
ret = conn->m->query(conn, query, query_len TSRMLS_CC);
|
||||
mnd_sprintf_free(query);
|
||||
if (commented_name) {
|
||||
mnd_sprintf_free(commented_name);
|
||||
}
|
||||
}
|
||||
} while (0);
|
||||
conn->m->local_tx_end(conn, this_func, ret TSRMLS_CC);
|
||||
@@ -2736,36 +2782,41 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "WITH CONSISTENT SNAPSHOT", sizeof("WITH CONSISTENT SNAPSHOT") - 1);
|
||||
}
|
||||
if (mode & TRANS_START_READ_WRITE) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
if (mode & (TRANS_START_READ_WRITE | TRANS_START_READ_ONLY)) {
|
||||
unsigned long server_version = conn->m->get_server_version(conn TSRMLS_CC);
|
||||
if (server_version < 50605L) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "This server version doesn't support 'READ WRITE' and 'READ ONLY'. Minimum 5.6.5 is required");
|
||||
smart_str_free(&tmp_str);
|
||||
break;
|
||||
} else if (mode & TRANS_START_READ_WRITE) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1);
|
||||
} else if (mode & TRANS_START_READ_ONLY) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1);
|
||||
}
|
||||
if (mode & TRANS_START_READ_ONLY) {
|
||||
if (tmp_str.len) {
|
||||
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
|
||||
}
|
||||
smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1);
|
||||
}
|
||||
smart_str_0(&tmp_str);
|
||||
|
||||
{
|
||||
char * commented_name = NULL;
|
||||
unsigned int commented_name_len = name? mnd_sprintf(&commented_name, 0, " /*%s*/", name):0;
|
||||
char * name_esc = mysqlnd_escape_string_for_tx_name_in_comment(name TSRMLS_CC);
|
||||
char * query;
|
||||
unsigned int query_len = mnd_sprintf(&query, 0, "START TRANSACTION%s %s", commented_name? commented_name:"", tmp_str.c? tmp_str.c:"");
|
||||
unsigned int query_len = mnd_sprintf(&query, 0, "START TRANSACTION%s %s", name_esc? name_esc:"", tmp_str.c? tmp_str.c:"");
|
||||
smart_str_free(&tmp_str);
|
||||
|
||||
if (name_esc) {
|
||||
mnd_efree(name_esc);
|
||||
name_esc = NULL;
|
||||
}
|
||||
if (!query) {
|
||||
SET_OOM_ERROR(*conn->error_info);
|
||||
break;
|
||||
}
|
||||
ret = conn->m->query(conn, query, query_len TSRMLS_CC);
|
||||
mnd_sprintf_free(query);
|
||||
if (commented_name) {
|
||||
mnd_sprintf_free(commented_name);
|
||||
}
|
||||
}
|
||||
} while (0);
|
||||
conn->m->local_tx_end(conn, this_func, ret TSRMLS_CC);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
ARG_ENABLE("opcache", "whether to enable Zend OPcache support", "yes");
|
||||
|
||||
if (PHP_OPCACHE != "no") {
|
||||
var PHP_OPCACHE_PGO = false;
|
||||
|
||||
PHP_PGI = "no"; // workaround
|
||||
PHP_PGO = "no"; // workaround
|
||||
if (PHP_OPCACHE != "no") {
|
||||
|
||||
EXTENSION('opcache', "\
|
||||
ZendAccelerator.c \
|
||||
|
||||
+12
-12
@@ -4384,6 +4384,7 @@ PHP_FUNCTION(openssl_seal)
|
||||
|
||||
if (!EVP_EncryptInit(&ctx,cipher,NULL,NULL)) {
|
||||
RETVAL_FALSE;
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
goto clean_exit;
|
||||
}
|
||||
|
||||
@@ -4394,10 +4395,12 @@ 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;
|
||||
}
|
||||
|
||||
@@ -4430,6 +4433,7 @@ PHP_FUNCTION(openssl_seal)
|
||||
efree(buf);
|
||||
}
|
||||
RETVAL_LONG(len1 + len2);
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
|
||||
clean_exit:
|
||||
for (i=0; i<nkeys; i++) {
|
||||
@@ -4488,25 +4492,21 @@ 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);
|
||||
if (keyresource == -1) {
|
||||
EVP_PKEY_free(pkey);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
RETVAL_FALSE;
|
||||
} else {
|
||||
zval_dtor(opendata);
|
||||
buf[len1 + len2] = '\0';
|
||||
ZVAL_STRINGL(opendata, erealloc(buf, len1 + len2 + 1), len1 + len2, 0);
|
||||
RETVAL_TRUE;
|
||||
}
|
||||
} else {
|
||||
efree(buf);
|
||||
if (keyresource == -1) {
|
||||
EVP_PKEY_free(pkey);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
if (keyresource == -1) {
|
||||
EVP_PKEY_free(pkey);
|
||||
}
|
||||
zval_dtor(opendata);
|
||||
buf[len1 + len2] = '\0';
|
||||
ZVAL_STRINGL(opendata, erealloc(buf, len1 + len2 + 1), len1 + len2, 0);
|
||||
RETURN_TRUE;
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Firebird/InterBase driver for PDO
|
||||
Firebird driver for PDO
|
||||
Ard Biesheuvel
|
||||
@@ -1,7 +1,3 @@
|
||||
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,4 +1,3 @@
|
||||
// $Id$
|
||||
// vim:ft=javascript
|
||||
|
||||
ARG_WITH("pdo-firebird", "Firebird support for PDO", "no");
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@@ -607,14 +605,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;
|
||||
ISC_STATUS *s = H->isc_status;
|
||||
const 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 ((l = isc_interprete(&buf[i],&s))) {
|
||||
while ((sizeof(buf)>(i+2))&&(l = fb_interpret(&buf[i],(sizeof(buf)-i-2),&s))) {
|
||||
i += l;
|
||||
strcpy(&buf[i++], " ");
|
||||
}
|
||||
@@ -697,8 +695,8 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRM
|
||||
|
||||
if (!dbh->methods) {
|
||||
char errmsg[512];
|
||||
ISC_STATUS *s = H->isc_status;
|
||||
isc_interprete(errmsg, &s);
|
||||
const ISC_STATUS *s = H->isc_status;
|
||||
fb_interpret(errmsg, sizeof(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);
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@@ -91,7 +89,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/InterBase", "enabled");
|
||||
php_info_print_table_header(2, "PDO Driver for Firebird", "enabled");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef PHP_PDO_FIREBIRD_H
|
||||
#define PHP_PDO_FIREBIRD_H
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef PHP_PDO_FIREBIRD_INT_H
|
||||
#define PHP_PDO_FIREBIRD_INT_H
|
||||
|
||||
|
||||
@@ -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) %sNo such process%s
|
||||
string(%d) %s%rNo such process|Operation not permitted%r%s
|
||||
===DONE====
|
||||
|
||||
|
||||
+23
-14
@@ -50,6 +50,12 @@
|
||||
|
||||
#define FILE_PREFIX "sess_"
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
# ifndef O_NOFOLLOW
|
||||
# define O_NOFOLLOW 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
char *lastkey;
|
||||
@@ -115,6 +121,7 @@ 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) {
|
||||
@@ -135,24 +142,26 @@ 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 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;
|
||||
}
|
||||
/* 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;
|
||||
}
|
||||
#endif
|
||||
flock(data->fd, LOCK_EX);
|
||||
|
||||
@@ -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->children->next || node->children->children || node->parent->children == node->parent->last ) {
|
||||
if ( !node->children || !node->parent || !node->next || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
|
||||
node = node->children;
|
||||
} else {
|
||||
iter_data = sxe->iter.data;
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
--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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
--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":{}}}}
|
||||
@@ -2055,7 +2055,7 @@ SPL_METHOD(RegexIterator, accept)
|
||||
}
|
||||
|
||||
if (intern->u.regex.flags & REGIT_INVERTED) {
|
||||
RETVAL_BOOL(Z_LVAL_P(return_value));
|
||||
RETVAL_BOOL(! Z_LVAL_P(return_value));
|
||||
}
|
||||
|
||||
if (use_copy) {
|
||||
@@ -3692,6 +3692,7 @@ PHP_MINIT_FUNCTION(spl_iterators)
|
||||
#if HAVE_PCRE || HAVE_BUNDLED_PCRE
|
||||
REGISTER_SPL_SUB_CLASS_EX(RegexIterator, FilterIterator, spl_dual_it_new, spl_funcs_RegexIterator);
|
||||
REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "USE_KEY", REGIT_USE_KEY);
|
||||
REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "INVERT_MATCH",REGIT_INVERTED);
|
||||
REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "MATCH", REGIT_MODE_MATCH);
|
||||
REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "GET_MATCH", REGIT_MODE_GET_MATCH);
|
||||
REGISTER_SPL_CLASS_CONST_LONG(RegexIterator, "ALL_MATCHES", REGIT_MODE_ALL_MATCHES);
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Bug #66702 (RegexIterator inverted result works as expected)
|
||||
--FILE--
|
||||
<?php
|
||||
/**
|
||||
* @author Joshua Thijssen <jthijssen+php@noxlogic.nl>
|
||||
*/
|
||||
|
||||
$it = new \ArrayIterator(array("foo", "bar", "baz"));
|
||||
$it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH);
|
||||
print_r(iterator_to_array($it2));
|
||||
$it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, \RegexIterator::INVERT_MATCH);
|
||||
print_r(iterator_to_array($it2));
|
||||
|
||||
$it = new \ArrayIterator(array("foo" => 1, "bar" => 2, "baz" => 3));
|
||||
$it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, \RegexIterator::USE_KEY);
|
||||
print_r(iterator_to_array($it2));
|
||||
$it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, \RegexIterator::USE_KEY | \RegexIterator::INVERT_MATCH);
|
||||
print_r(iterator_to_array($it2));
|
||||
|
||||
--EXPECTF--
|
||||
Array
|
||||
(
|
||||
[1] => bar
|
||||
[2] => baz
|
||||
)
|
||||
Array
|
||||
(
|
||||
[0] => foo
|
||||
)
|
||||
Array
|
||||
(
|
||||
[bar] => 2
|
||||
[baz] => 3
|
||||
)
|
||||
Array
|
||||
(
|
||||
[foo] => 1
|
||||
)
|
||||
|
||||
+2522
-1876
File diff suppressed because it is too large.
Load diff
@@ -107,9 +107,9 @@ extern "C" {
|
||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.8.3.1"
|
||||
#define SQLITE_VERSION_NUMBER 3008003
|
||||
#define SQLITE_SOURCE_ID "2014-02-11 14:52:19 ea3317a4803d71d88183b29f1d3086f46d68a00e"
|
||||
#define SQLITE_VERSION "3.8.4.3"
|
||||
#define SQLITE_VERSION_NUMBER 3008004
|
||||
#define SQLITE_SOURCE_ID "2014-04-03 16:53:12 a611fa96c4a848614efe899130359c9f6fb889c3"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
@@ -6122,7 +6122,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
||||
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
|
||||
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19
|
||||
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20
|
||||
#define SQLITE_TESTCTRL_LAST 20
|
||||
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21
|
||||
#define SQLITE_TESTCTRL_LAST 21
|
||||
|
||||
/*
|
||||
** CAPI3REF: SQLite Runtime Status
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#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"
|
||||
@@ -163,6 +166,7 @@ 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;
|
||||
|
||||
+12
-5
@@ -5590,14 +5590,19 @@ PHP_FUNCTION(substr_compare)
|
||||
int s1_len, s2_len;
|
||||
long offset, len=0;
|
||||
zend_bool cs=0;
|
||||
uint cmp_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssl|lb", &s1, &s1_len, &s2, &s2_len, &offset, &len, &cs) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (ZEND_NUM_ARGS() >= 4 && len < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The length must be greater than or equal to zero");
|
||||
RETURN_FALSE;
|
||||
if (ZEND_NUM_ARGS() >= 4 && len <= 0) {
|
||||
if (len == 0) {
|
||||
RETURN_LONG(0L);
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The length must be greater than or equal to zero");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (offset < 0) {
|
||||
@@ -5610,10 +5615,12 @@ PHP_FUNCTION(substr_compare)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
cmp_len = (uint) (len ? len : MAX(s2_len, (s1_len - offset)));
|
||||
|
||||
if (!cs) {
|
||||
RETURN_LONG(zend_binary_strncmp(s1 + offset, (s1_len - offset), s2, s2_len, (uint)len));
|
||||
RETURN_LONG(zend_binary_strncmp(s1 + offset, (s1_len - offset), s2, s2_len, cmp_len));
|
||||
} else {
|
||||
RETURN_LONG(zend_binary_strncasecmp_l(s1 + offset, (s1_len - offset), s2, s2_len, (uint)len));
|
||||
RETURN_LONG(zend_binary_strncasecmp_l(s1 + offset, (s1_len - offset), s2, s2_len, cmp_len));
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -23,7 +23,22 @@ GetImageSize()
|
||||
var_dump($result);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(12) {
|
||||
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"
|
||||
}
|
||||
["test1bpix.bmp"]=>
|
||||
array(6) {
|
||||
[0]=>
|
||||
|
||||
@@ -25,7 +25,9 @@ image_type_to_mime_type()
|
||||
var_dump($result);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(12) {
|
||||
array(13) {
|
||||
["test-1pix.bmp"]=>
|
||||
string(14) "image/x-ms-bmp"
|
||||
["test1bpix.bmp"]=>
|
||||
string(14) "image/x-ms-bmp"
|
||||
["test1pix.bmp"]=>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 B |
@@ -0,0 +1,21 @@
|
||||
--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===
|
||||
@@ -0,0 +1,78 @@
|
||||
--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===
|
||||
@@ -3,6 +3,7 @@ substr_compare()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(substr_compare("abcde", "df", -2) < 0);
|
||||
var_dump(substr_compare("abcde", "bc", 1, 2));
|
||||
var_dump(substr_compare("abcde", "bcg", 1, 2));
|
||||
var_dump(substr_compare("abcde", "BC", 1, 2, true));
|
||||
@@ -20,6 +21,7 @@ var_dump(substr_compare("abcde", -1, 0, "str", new stdClass));
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
|
||||
@@ -845,6 +845,13 @@ echo "Done";
|
||||
string(1) "/"
|
||||
}
|
||||
|
||||
--> /rest/Users?filter={"id":"123"}: array(2) {
|
||||
["path"]=>
|
||||
string(11) "/rest/Users"
|
||||
["query"]=>
|
||||
string(19) "filter={"id":"123"}"
|
||||
}
|
||||
|
||||
--> http:///blah.com: bool(false)
|
||||
|
||||
--> http://:80: bool(false)
|
||||
|
||||
@@ -110,6 +110,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : string(4) "http"
|
||||
--> : NULL
|
||||
--> / : NULL
|
||||
--> /rest/Users?filter={"id":"123"} : NULL
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -109,6 +109,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : string(6) "[x:80]"
|
||||
--> : NULL
|
||||
--> / : NULL
|
||||
--> /rest/Users?filter={"id":"123"} : NULL
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -109,6 +109,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : NULL
|
||||
--> : NULL
|
||||
--> / : NULL
|
||||
--> /rest/Users?filter={"id":"123"} : NULL
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -109,6 +109,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : NULL
|
||||
--> : NULL
|
||||
--> / : NULL
|
||||
--> /rest/Users?filter={"id":"123"} : NULL
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -109,6 +109,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : NULL
|
||||
--> : NULL
|
||||
--> / : NULL
|
||||
--> /rest/Users?filter={"id":"123"} : NULL
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -109,6 +109,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : string(1) "/"
|
||||
--> : string(0) ""
|
||||
--> / : string(1) "/"
|
||||
--> /rest/Users?filter={"id":"123"} : string(11) "/rest/Users"
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -109,6 +109,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : NULL
|
||||
--> : NULL
|
||||
--> / : NULL
|
||||
--> /rest/Users?filter={"id":"123"} : string(19) "filter={"id":"123"}"
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -109,6 +109,7 @@ echo "Done";
|
||||
--> http://[x:80]/ : NULL
|
||||
--> : NULL
|
||||
--> / : NULL
|
||||
--> /rest/Users?filter={"id":"123"} : NULL
|
||||
--> http:///blah.com : bool(false)
|
||||
--> http://:80 : bool(false)
|
||||
--> http://user@:80 : bool(false)
|
||||
|
||||
@@ -89,6 +89,7 @@ $urls = array(
|
||||
'http://[x:80]/',
|
||||
'',
|
||||
'/',
|
||||
'/rest/Users?filter={"id":"123"}',
|
||||
|
||||
// Severely malformed URLs that do not parse:
|
||||
'http:///blah.com',
|
||||
|
||||
@@ -180,6 +180,11 @@ 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);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,11 @@
|
||||
<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>
|
||||
@@ -0,0 +1,7 @@
|
||||
<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>
|
||||
@@ -0,0 +1,27 @@
|
||||
--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
@@ -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 of trailing spaces, linefeeds and carriage-returns */
|
||||
/* cut off trailing spaces, linefeeds and carriage-returns */
|
||||
if (header_line_len && isspace(header_line[header_line_len-1])) {
|
||||
do {
|
||||
header_line_len--;
|
||||
|
||||
@@ -234,6 +234,13 @@ 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;
|
||||
}
|
||||
@@ -248,6 +255,13 @@ 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;
|
||||
}
|
||||
|
||||
@@ -518,7 +518,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_add(&EG(symbol_table), "argc", sizeof("argc"), &argc, sizeof(zval *), NULL);
|
||||
zend_hash_update(&EG(symbol_table), "argc", sizeof("argc"), &argc, sizeof(zval *), NULL);
|
||||
}
|
||||
if (track_vars_array) {
|
||||
Z_ADDREF_P(arr);
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
/* edit configure.in to change version number */
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 5
|
||||
#define PHP_RELEASE_VERSION 11
|
||||
#define PHP_RELEASE_VERSION 12
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.5.11"
|
||||
#define PHP_VERSION_ID 50511
|
||||
#define PHP_VERSION "5.5.12"
|
||||
#define PHP_VERSION_ID 50512
|
||||
+11
-2
@@ -731,6 +731,10 @@ 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);
|
||||
|
||||
@@ -1396,11 +1400,16 @@ 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) {
|
||||
PHPWRITE(p, mapped);
|
||||
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);
|
||||
|
||||
php_stream_mmap_unmap_ex(stream, mapped);
|
||||
|
||||
return mapped;
|
||||
return bcount;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -588,7 +588,8 @@ 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, (struct sockaddr *)&unix_addr, sizeof(unix_addr));
|
||||
return bind(sock->socket, (const struct sockaddr *)&unix_addr,
|
||||
(socklen_t) XtOffsetOf(struct sockaddr_un, sun_path) + xparam->inputs.namelen);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -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 NT, not valid in Windows 95).
|
||||
; Log errors to syslog (Event Log on Windows).
|
||||
;error_log = syslog
|
||||
|
||||
;windows.show_crt_warning
|
||||
@@ -1014,7 +1014,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 NT, not valid in Windows 95).
|
||||
; Log mail to syslog (Event Log on Windows).
|
||||
;mail.log = syslog
|
||||
|
||||
[SQL]
|
||||
|
||||
+2
-2
@@ -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 NT, not valid in Windows 95).
|
||||
; Log errors to syslog (Event Log on Windows).
|
||||
;error_log = syslog
|
||||
|
||||
;windows.show_crt_warning
|
||||
@@ -1014,7 +1014,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 NT, not valid in Windows 95).
|
||||
; Log mail to syslog (Event Log on Windows).
|
||||
;mail.log = syslog
|
||||
|
||||
[SQL]
|
||||
|
||||
@@ -670,7 +670,7 @@ zend_first_try {
|
||||
}
|
||||
|
||||
apr_table_set(r->notes, "mod_php_memory_usage",
|
||||
apr_psprintf(ctx->r->pool, "%zu", zend_memory_peak_usage(1 TSRMLS_CC)));
|
||||
apr_psprintf(ctx->r->pool, "%" APR_SIZE_T_FMT, zend_memory_peak_usage(1 TSRMLS_CC)));
|
||||
}
|
||||
|
||||
} zend_end_try();
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
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");
|
||||
|
||||
@@ -35,7 +35,7 @@ int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
/* uninitialized */
|
||||
wp->socket_uid = -1;
|
||||
wp->socket_gid = -1;
|
||||
wp->socket_mode = 0666;
|
||||
wp->socket_mode = 0660;
|
||||
|
||||
if (!c) {
|
||||
return 0;
|
||||
|
||||
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user