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