php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63883 Example in locale_lookup() function is misleading.
Submitted: 2013-01-02 04:25 UTC Modified: 2014-02-24 23:21 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:2 of 3 (66.7%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: cappytoi at yahoo dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.4.10 OS: CENTOS
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cappytoi at yahoo dot com
New email:
PHP Version: OS:

 

 [2013-01-02 04:25 UTC] cappytoi at yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/locale.lookup#refsect1-locale.lookup-examples
---

While the method signature is;
string locale_lookup ( array $langtag , string $locale [, bool $canonicalize = 
false [, string $default ]] )

Both examples states that:
echo locale_lookup($arr, 'de-DE-1996-x-prv1-prv2', 'en_US');

The writer forgot to add $canonicalize before $default



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-24 23:21 UTC] cappytoi at yahoo dot com
-Status: Open +Status: Closed
 [2014-02-24 23:21 UTC] cappytoi at yahoo dot com
As of now this issue seems to be resolved.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 09:00:02 2026 UTC