Le mercredi 4 novembre 2015, 21:41:20 Bishop Bettini a écrit : > > If one wanted truly robust (paranoid) code, you'd probably want to do: > > $port = getservbyname('ldap', 'tcp'); > > if (isset($options['port']) && is_numeric($options['port'])) > $port = intval($options['port']); > > $resource = ldap_connect($host, $port); > > And this could go in a comment and solve the whole issue without code > changes.
Ok, so we could just put in the documentation the tip about getservbyname if one does not want to use 389 directly. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php