I got mail from someone saying that in previous version, calling ldap_connect($host, NULL) would use default port. While now it is considered as trying to use port 0 and trigger an error.
I’m a bit troubled about it because the documentation says: resource ldap_connect ([ string $hostname = NULL [, int $port = 389 ]] ) So $port defaults to 389 and not to NULL, and it says nothing about accepting NULL as second parameter. That said, it does seem handful to be able to pass NULL to ask for default port without remembering which one it is. The context is something like: $port = NULL; if (isset($options['port'])) { $port = $options['port']; } $resource = ldap_connect($host, $port); Right now it either needs an if statement or hardcoding 389 instead of NULL as the default. In the C code we use the constant LDAP_PORT for this but there is no such thing in PHP. Any ideas/comments about this? MCMic -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php