you are correct, ldap_close is an alias of ldap_unbind; the call is redundant the line for ldap_close($conn) can be removed