#48751 [Opn->Asn]: intl Locale::filterMatches wrong parameters and example

From: Date: Wed, 01 Jul 2009 11:26:40 +0000
Subject: #48751 [Opn->Asn]: intl Locale::filterMatches wrong parameters and example
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2442@lists.php.net to get a copy of this message
ID: 48751 Updated by: bjori@php.net Reported By: ladislav at marek dot su -Status: Open +Status: Assigned Bug Type: Documentation problem Operating System: irrelevant PHP Version: Irrelevant -Assigned To: +Assigned To: stas New Comment: By the looks of things, the 3rd argument (canonical) should be boolean (default to false).. Stas: Could you update the locale_api.php and proto, and the arginfo+param parsing if I'm right? Previous Comments: ------------------------------------------------------------------------ [2009-07-01 07:48:35] ladislav at marek dot su Description: ------------ Documentation says that Locale::filterMatches has two parameters, but reflection shows three: Method [ <internal:intl> static public method filterMatches ] { - Parameters [3] { Parameter #0 [ <required> $arg1 ] Parameter #1 [ <required> $arg2 ] Parameter #2 [ <required> $arg3 ] } } And in OO example is used incorrect method name Locale::filter_matches instead of Locale::filterMatches. http://docs.php.net/manual/en/locale.filtermatches.php Reproduce code: --------------- var_dump(Locale::filterMatches('de-DE-1996', 'de-DE')); Expected result: ---------------- bool(%b) Actual result: -------------- Warning: Locale::filterMatches() expects exactly 3 parameters, 2 given in %s on line %n bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48751&edit=1

« previous php.doc.bugs (#2442) next »