|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: cz dot paranoiq at gmail dot com
New email:
PHP Version: OS:


 [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-2022 The PHP Group
All rights reserved.
Last updated: Mon Aug 15 13:03:41 2022 UTC