|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
6 + 2 = ?
Subscribe to this entry?

 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 16:01:28 2024 UTC