|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74385 Locale::parseLocale() broken with some arguments
Submitted: 2017-04-06 14:21 UTC Modified: -
From: cz dot paranoiq at gmail dot com Assigned:
Status: Closed Package: intl (PECL)
PHP Version: 7.1.3 OS:
Private report: No CVE-ID: None
 [2017-04-06 14:21 UTC] cz dot paranoiq at gmail dot com
Locale::parseLocale (and locale_parse) is not able to parse locale with advanced agruments since PHP 5.6.28, 7.0.14 and 7.1.x (see

Test script:



Expected result:
array(2) {
  ["language"]=> string(2) "cs"
  ["region"]=> string(2) "CZ"
array(7) {
  ["language"]=> string(2) "cs"
  ["script"]=> string(4) "Latn"
  ["region"]=> string(2) "CZ"
  ["variant0"]=> string(4) "VAR1"
  ["variant1"]=> string(4) "VAR2"
  ["private0"]=> string(4) "PRI1"
  ["private1"]=> string(103) "PRI2@calendar=iso8601;colbackwards=yes;colcasefirst=lower;collation=phonebook;currency=CZK;numbers=arab"

Actual result:
array(2) {
  ["language"]=> string(2) "cs"
  ["region"]=> string(2) "CZ"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-03 14:45 UTC]
Automatic comment on behalf of ab
Log: Fixed bug #74385 Locale::parseLocale() broken with some arguments
 [2018-05-03 14:45 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Nov 30 08:01:26 2023 UTC