1--TEST-- 2Function snmpgetnext 3--CREDITS-- 4Olivier Doucet & Boris Lytochkin 5--SKIPIF-- 6<?php 7require_once(__DIR__.'/skipif.inc'); 8?> 9--FILE-- 10<?php 11require_once(__DIR__.'/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(snmpgetnext($hostname, $community, '.1.3.6.1.2.1.1.1.0', $timeout, $retries)); 19echo "Single OID in array\n"; 20var_dump(snmpgetnext($hostname, $community, array('.1.3.6.1.2.1.1.1.0'), $timeout, $retries)); 21echo "Multiple OID\n"; 22var_dump(snmpgetnext($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 27string(%d) "%s" 28Single OID in array 29array(1) { 30 ["%s"]=> 31 string(%d) "%s" 32} 33Multiple OID 34array(2) { 35 ["%s"]=> 36 string(%d) "%s" 37 ["%s"]=> 38 string(%d) "%d" 39} 40