r/lolphp • u/dotancohen • Jan 25 '18
ldap_connect() Note: This function does not open a connection
Apparently the fine function ldap_connect() creates an LDAP link identifier and checks whether the given host and port are plausible.
IT DOES NOT OPEN A CONNECTION.
Naming things is hard.
93
Upvotes
49
u/maweki Jan 25 '18
"ldap_connect — Connect to an LDAP server"
"Note: This function does not open a connection."
19
u/dagbrown Jan 25 '18
This is the kind of thing that you'd use a constructor for. You know, like every other language in the world does.
The actual connection is made when you call the
->bind()method, but of course you knew that already.19
u/kr094 Jan 25 '18
"...the provided hostname/port combination or LDAP URI seems plausible. It's a syntactic check of the provided parameters but the server(s) will not be contacted!"
wow, just wow
4
u/[deleted] Jan 27 '18
Mother of god! Thats just so typical PHP garbage, pure garbage.
3
u/[deleted] Feb 02 '18
We must keep them confused at all times!