ID: 43779 Updated by: [EMAIL PROTECTED] -Summary: ldap_explode_dn returns undocumented values Reported By: gabe at mudbugmedia dot com -Status: Closed +Status: Open -Bug Type: Documentation problem +Bug Type: LDAP related -PHP Version: Irrelevant +PHP Version: 5.2.6 New Comment:
The "count" element is unnecessary as PHP has count() function. Previous Comments: ------------------------------------------------------------------------ [2008-11-07 14:08:40] [EMAIL PROTECTED] This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "The first element in this array has count key and represents the number of returned values, next elements are numerically indexed DN components." ------------------------------------------------------------------------ [2008-01-07 20:50:38] gabe at mudbugmedia dot com Description: ------------ The documentation for ldap_explode_dn says that the return value should be "Returns an array of all DN components.". Not only is this vague (a separate problem), it fails to document that the returned array is an associative array where the first key/value being 'count' => (integer), where the count is the total number of elements in the array. Reproduce code: --------------- $dn="cn=example,dc=example,dc=com"; var_dump(ldap_explode_dn($dn,0)); Expected result: ---------------- array(3) { [0]=> string(19) "cn=example" [1]=> string(19) "dc=example" [2]=> string(4) "dc=com" } Actual result: -------------- array(3) { ["count"]=> int(3) [0]=> string(19) "cn=example" [1]=> string(19) "dc=example" [2]=> string(4) "dc=com" } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43779&edit=1