boolean cat(string dn)
The cat() function will "get data" for a specific DN. cat actually performs a ldap_search with a scope of LDAP_SCOPE_BASE.

It will return TRUE if the search was successful, otherwise it will return FALSE. Keep in mind that a successful search does not neccessarily return any entries.

The cat() function only performs the search. You will need to use the fetch() function to retrieve the data.

For information on LDAP search filters, look at the ldap_search man page, or visit RFC 1558.


$ldap = new LDAP();
$ldap->cat("cn=Bob Vila, ou=people, dc=ypass, dc=net");
$attrs = $ldap->fetch();