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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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