Stubs in ext/ldap
| From: | Côme Chilliet | Date: | Thu, 17 Sep 2020 12:53:04 +0000 |
| Subject: | Stubs in ext/ldap | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-111878@lists.php.net to get a copy of this message | ||
Hello,
After playing with phpstan and seeing their stubs for some LDAP functions were
wrong, I noticed that documentation for LDAP functions and stubs in
ext/ldap/ldap.stub.php differs.
Especially in a lot of functions, the documentation states "string $dn = NULL"
but the stub states non-nullable string parameter. Also, the ldap.stub.php
file contains a lot of "string $bind_rdn = UNKNOWN" in places where the
documentations states = NULL. What does UNKOWN mean here?
I would like to fix those conflicts.
Basically my questions are:
1) What is the difference between s and S in zend_parse_parameters and how do
they behave for a NULL value?
2) What would changing = UNKNOWN to = NULL impact?
3) When a function like ldap_bind is called, is calling ldap_bind($link), and
ldap_bind($link, NULL) changing anything else than ZEND_NUM_ARGS?
Côme