ldap_parse_result
Extract information from result.
ldap_parse_result Function synopsis
ldap_parse_result(
LDAP\Connection $ldap,
LDAP\Result $result,
&$error_code,
&$matched_dn = null,
&$error_message = null,
&$referrals = null,
&$controls = null
): bool
Parameters
$ldap
TypeLDAP\Connection
An LDAP\Connection instance, returned by ldap_connect.
$result
TypeLDAP\Result
An LDAP\Result instance, returned by ldap_list or ldap_search.
$error_code
Passed by reference
A reference to a variable that will be set to the LDAP error code in
the result, or 0 if no error occurred.
$matched_dn
Passed by reference, OptionalDefault valuenull
A reference to a variable that will be set to a matched DN if one was
recognised within the request, otherwise it will be set to null.
$error_message
Passed by reference, OptionalDefault valuenull
A reference to a variable that will be set to the LDAP error message in the result, or an empty string if no error occurred.
$referrals
Passed by reference, OptionalDefault valuenull
A reference to a variable that will be set to an array set
to all of the referral strings in the result, or an empty array if no
referrals were returned.
$controls
Passed by reference, OptionalDefault valuenull
An array of LDAP Controls which have been sent with the response.
Note that the parameters
$error_code,$matched_dn,$error_message,$referrals, and$controlsare passed by reference, and contain additional/updated context data that may be useful.
Return value
Typebool
Returns true on success, false on failure
Changes to the ldap_parse_result Function
PHP 8.1
- Parameter type added for parameter #1 (
$ldap):LDAP\Connection - Parameter type added for parameter #2 (
$result):LDAP\Result
ldap_parse_result(
- $ldap,
+ LDAP\Connection $ldap,
- $result,
+ LDAP\Result $result,
&$error_code,
&$matched_dn = null,
&$error_message = null,
&$referrals = null,
&$controls = null
): bool PHP 8.0
- Return type added:
bool - Parameter name of parameter #1 changed:
$linkto$ldap - Parameter name of parameter #3 changed:
$errcodeto$error_code - Parameter name of parameter #4 changed:
$matcheddnto$matched_dn - Parameter default value added for position #4 (
$matched_dn):null - Parameter name of parameter #5 changed:
$errmsgto$error_message - Parameter default value added for position #5 (
$error_message):null - Parameter default value added for position #6 (
$referrals):null - Parameter name of parameter #7 changed:
$serverctrlsto$controls - Parameter default value added for position #7 (
$controls):null
ldap_parse_result(
- $link,
+ $ldap,
$result,
- &$errcode,
+ &$error_code,
- &$matcheddn,
+ &$matched_dn = null,
- &$errmsg,
+ &$error_message = null,
- &$referrals,
+ &$referrals = null,
- &$serverctrls
+ &$controls = null
- )
+ ): bool PHP 7.3
- Optional parameter added - #7:
&$serverctrls
ldap_parse_result(
$link,
$result,
&$errcode,
&$matcheddn,
&$errmsg,
- &$referrals
+ &$referrals,
+ &$serverctrls
) ldap_parse_result Function Availability
ldap_parse_result Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |