1--TEST-- 2Function snmp2_getnext 3--CREDITS-- 4Olivier Doucet & Boris Lytochkin 5--SKIPIF-- 6<?php 7require_once(dirname(__FILE__).'/skipif.inc'); 8?> 9--FILE-- 10<?php 11require_once(dirname(__FILE__).'/snmp_include.inc'); 12 13//EXPECTF format is quickprint OFF 14snmp_set_quick_print(false); 15snmp_set_valueretrieval(SNMP_VALUE_PLAIN); 16 17echo "Single OID\n"; 18var_dump(snmp2_getnext($hostname, $community, '.1.3.6.1.2.1.1.1.0', $timeout, $retries)); 19echo "Single OID in array\n"; 20var_dump(snmp2_getnext($hostname, $community, array('.1.3.6.1.2.1.1.1.0'), $timeout, $retries)); 21echo "Multiple OID\n"; 22var_dump(snmp2_getnext($hostname, $community, array('.1.3.6.1.2.1.1.1.0', '.1.3.6.1.2.1.1.6.0'), $timeout, $retries)); 23 24?> 25--EXPECTF-- 26Single OID 27%unicode|string%(%d) "%s" 28Single OID in array 29array(1) { 30 ["%s"]=> 31 %unicode|string%(%d) "%s" 32} 33Multiple OID 34array(2) { 35 ["%s"]=> 36 %unicode|string%(%d) "%s" 37 ["%s"]=> 38 %unicode|string%(%d) "%d" 39} 40