The array created by this function is similar to the on from ldap_get_entries() but when it creates array keys it alters the attribute's case inconsistently.
ldap_get_entries() lowercases all of the attributes before keying the array with them, but this function appears to leave things as they are.
If you're having problems, do a print_r and make sure you're using correct case for array keys. For example, you might need to use "objectClass" and not "objectclass".