src/LdapClient.php
public function compare($dn, $attribute, $value)
	{
		if (!$this->isBound || !$this->isConnected())
		{
			return false;
		}

		return ldap_compare($this->resource, $dn, $attribute, $value);
	}
public function compare($dn, $attribute, $value)
	{
		if (!$this->isBound || !$this->isConnected())
		{
			return false;
		}

		return ldap_compare($this->resource, $dn, $attribute, $value);
	}
public function compare ( $ dn , $ attribute , $ value ) { if ( ! $ this -> isBound || ! $ this -> isConnected ( ) ) { return false ; } return ldap_compare ( $ this -> resource , $ dn , $ attribute , $ value ) ; }
Compare value of attribute found in entry specified with DN

@param   string  $dn         The DN which contains the attribute you want to compare
@param   string  $attribute  The attribute whose value you want to compare
@param   string  $value      The value you want to check against the LDAP attribute

@return  boolean|integer  Boolean result of the comparison or -1 on error

@since   1.0
Compare value of attribute found in entry specified with DN