Download src/php/php-src/ext/ldap/tests/ldap_connect_variation.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 740 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ldap/tests/ldap_connect_variation.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ldap/tests/ldap_connect_variation.phpt
-
curl -L -o ldap_connect_variation.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ldap/tests/ldap_connect_variation.phpt
740 Bytes
| --TEST-- | |
| ldap_connect() - Variation | |
| --CREDITS-- | |
| Patrick Allaert <patrickallaert@php.net> | |
| # Belgian PHP Testfest 2009 | |
| --EXTENSIONS-- | |
| ldap | |
| --FILE-- | |
| require "connect.inc"; | |
| // no hostname, no port | |
| $link = ldap_connect(); | |
| var_dump($link); | |
| // no port | |
| $link = ldap_connect($host); | |
| var_dump($link); | |
| // URI | |
| $link = ldap_connect("ldap://$host:$port"); | |
| var_dump($link); | |
| // URI no port | |
| $link = ldap_connect("ldap://$host"); | |
| var_dump($link); | |
| // bad hostname (connect should work, not bind) | |
| $link = ldap_connect("nonexistent" . $host); | |
| var_dump($link); | |
| --EXPECTF-- | |
| object(LDAP\Connection)#%d (0) { | |
| } | |
| object(LDAP\Connection)#%d (0) { | |
| } | |
| object(LDAP\Connection)#%d (0) { | |
| } | |
| object(LDAP\Connection)#%d (0) { | |
| } | |
| object(LDAP\Connection)#%d (0) { | |
| } | |