note 124751 added to function.ldap-escape
| From: | support at extollit dot com | Date: | Mon, 24 Feb 2020 18:35:41 +0000 |
| Subject: | note 124751 added to function.ldap-escape | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214214@lists.php.net to get a copy of this message | ||
Suppose you want to reverse the operation, here is a way to "ldap_unescape"
function ldap_unescape($string) {
return
preg_replace_callback(
"/\\\\\\\\[\da-z]{2}/",
function ($matches) {
$match = array_shift($matches);
return hex2bin(substr($match, 2));
},
$string
);
}
ldap_unescape("uid=\\\\6a\\\\6f\\\\6e\\\\61\\\\74\\\\68\\\\61\\\\6e,ou=people,dc=extollit,dc=com");
----
Server IP: 45.112.84.4
Probable Submitter: 38.142.137.34 (proxied: 50.92.50.215)
----
Manual Page -- http://php.net/manual/en/function.ldap-escape.php
Edit -- https://master.php.net/note/edit/124751
Del: integrated -- https://master.php.net/note/delete/124751/integrated
Del: useless -- https://master.php.net/note/delete/124751/useless
Del: bad code -- https://master.php.net/note/delete/124751/bad+code
Del: spam -- https://master.php.net/note/delete/124751/spam
Del: non-english -- https://master.php.net/note/delete/124751/non-english
Del: in docs -- https://master.php.net/note/delete/124751/in+docs
Del: other reasons-- https://master.php.net/note/delete/124751
Reject -- https://master.php.net/note/reject/124751
Search -- https://master.php.net/manage/user-notes.php