1--TEST-- 2ldap_get_option() - More ldap_get_option() operations 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$link = ldap_connect($host, $port); 13$option = null; 14 15$controls = array( 16 array("oid" => "1.2.752.58.10.1", "iscritical" => true), 17 array("oid" => "1.2.752.58.1.10", "value" => "magic"), 18); 19 20ldap_set_option($link, LDAP_OPT_DEREF, LDAP_DEREF_NEVER); 21ldap_set_option($link, LDAP_OPT_SIZELIMIT, 123); 22ldap_set_option($link, LDAP_OPT_TIMELIMIT, 33); 23ldap_set_option($link, LDAP_OPT_NETWORK_TIMEOUT, 44); 24ldap_set_option($link, LDAP_OPT_REFERRALS, false); 25ldap_set_option($link, LDAP_OPT_SERVER_CONTROLS, $controls); 26ldap_set_option($link, LDAP_OPT_CLIENT_CONTROLS, $controls); 27ldap_set_option($link, LDAP_OPT_RESTART, false); 28 29var_dump( 30 ldap_get_option($link, LDAP_OPT_DEREF, $option), 31 $option, 32 ldap_get_option($link, LDAP_OPT_SIZELIMIT, $option), 33 $option, 34 ldap_get_option($link, LDAP_OPT_TIMELIMIT, $option), 35 $option, 36 ldap_get_option($link, LDAP_OPT_NETWORK_TIMEOUT, $option), 37 $option, 38 ldap_get_option($link, LDAP_OPT_REFERRALS, $option), 39 $option, 40 ldap_get_option($link, LDAP_OPT_RESTART, $option), 41 $option, 42 ldap_get_option($link, LDAP_OPT_SERVER_CONTROLS, $option), 43 $option, 44 ldap_get_option($link, LDAP_OPT_CLIENT_CONTROLS, $option), 45 $option 46); 47?> 48===DONE=== 49--EXPECT-- 50bool(true) 51int(0) 52bool(true) 53int(123) 54bool(true) 55int(33) 56bool(true) 57int(44) 58bool(true) 59int(0) 60bool(true) 61int(0) 62bool(false) 63int(0) 64bool(false) 65int(0) 66===DONE=== 67