Doc #54176 [Ver->Csd]: locale_compose accepts more than 3 extlang

From: Date: Tue, 15 Jun 2021 09:35:28 +0000
Subject: Doc #54176 [Ver->Csd]: locale_compose accepts more than 3 extlang
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18859@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54176&edit=1 ID: 54176 Updated by: git@php.net Reported by: giorgio dot liscio at email dot it Summary: locale_compose accepts more than 3 extlang -Status: Verified +Status: Closed Type: Documentation Problem Package: intl PHP Version: 5.3.5 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmb69 Revision: https://github.com/php/doc-en/commit/e9340fb6bcb73976f0d18225b9fdbb49ba034100 Log: Fix #54176: locale_compose accepts more than 3 extlang Previous Comments: ------------------------------------------------------------------------ [2021-06-15 09:32:19] cmb@php.net After closer analysis, this is intended behavior, so the documentation needs to be fixed. ------------------------------------------------------------------------ [2021-06-14 16:18:04] cmb@php.net The following pull request has been associated: Patch Name: Fix #54176: locale_compose accepts more than 3 extlang On GitHub: https://github.com/php/php-src/pull/7152 Patch: https://github.com/php/php-src/pull/7152.patch ------------------------------------------------------------------------ [2017-09-12 14:07:25] cmb@php.net See <https://3v4l.org/knFrX> (correct behavior) vs. <https://3v4l.org/mKqT4> (erroneous behavior, since only up to three extlangs are supposed to be supported). Apparently, the max_value which is regarded for multiple numbered keys [1] is ignored for the single array case[2]. [1] <https://github.com/php/php-src/blob/PHP-7.0.23/ext/intl/locale/locale_methods.c#L858-L866> [2] <https://github.com/php/php-src/blob/PHP-7.0.23/ext/intl/locale/locale_methods.c#L837-L852> ------------------------------------------------------------------------ [2011-03-07 08:43:43] giorgio dot liscio at email dot it Description: ------------ hi, just a "cosmetic problem" probably are affected variants and privates too bad result: <?php $arr = array( 'language'=>'en' , 'script' =>'Hans' , 'region' =>'CN' 'extlang' => array('a','b','c','d','e','f') ); echo locale_compose( $arr ); ?> good result: <?php $arr = array( 'language'=>'en' , 'script' =>'Hans' , 'region' =>'CN' 'extlang0' => 'a', 'extlang1' => 'b', 'extlang2' => 'c', 'extlang3' => 'd' ); echo locale_compose( $arr ); ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54176&edit=1

« previous php.doc.bugs (#18859) next »