ldap_exop

PHP 7 >= 7.2.0, PHP 8
ldap_exop - Performs an extended operation
Manual
Code Examples

ldap_exop(
     LDAP\Connection$ldap,
     string$reqoid,
     [string$reqdata = null],
     [array$serverctrls = null],
     [stringretdata],
     [stringretoid]
): mixed

Performs an extended operation on the specified link with reqoid the OID of the operation and reqdata the data.

Parameters

ldap

An LDAP\Connection instance, returned by ldap_connect.

reqoid

The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.

reqdata

The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.

serverctrls

Array of LDAP Controls to send with the request.

retdata

Will be filled with the extended operation response data if provided. If not provided you may use ldap_parse_exop on the result object later to get this data.

retoid

Will be filled with the response OID if provided, usually equal to the request OID.

Return Values

When used with retdata, returns true on success or false on error. When used without retdata, returns a result identifier or false on error.

Changelog

Version Description
8.1.0 The ldap parameter expects an LDAP\Connection instance now; previously, a resource was expected.
7.3 Support for serverctrls added

Related Functions

Example of ldap_exop

Show all examples for ldap_exop

PHP Version: