1--TEST-- 2ldap_connect() - Variation 3--CREDITS-- 4Patrick Allaert <patrickallaert@php.net> 5# Belgian PHP Testfest 2009 6--SKIPIF-- 7<?php require_once('skipif.inc'); ?> 8--FILE-- 9<?php 10require "connect.inc"; 11 12// no hostname, no port 13$link = ldap_connect(); 14var_dump($link); 15 16// no port 17$link = ldap_connect($host); 18var_dump($link); 19 20// URI 21$link = ldap_connect("ldap://$host:$port"); 22var_dump($link); 23 24// URI no port 25$link = ldap_connect("ldap://$host"); 26var_dump($link); 27 28// bad hostname (connect should work, not bind) 29$link = ldap_connect("nonexistent" . $host); 30var_dump($link); 31?> 32--EXPECTF-- 33resource(%d) of type (ldap link) 34resource(%d) of type (ldap link) 35resource(%d) of type (ldap link) 36resource(%d) of type (ldap link) 37resource(%d) of type (ldap link) 38