--TEST-- Function snmpget --CREDITS-- Olivier Doucet & Boris Lytochkin --EXTENSIONS-- snmp --SKIPIF-- --FILE-- --EXPECTF-- Checking working Single OID, default timeout and retries string(%d) "%s" Single OID, default retries string(%d) "%s" Single OID string(%d) "%s" Single OID in array array(1) { ["%s"]=> string(%d) "%s" } Multiple OID array(2) { ["%s"]=> string(%d) "%s" ["%s"]=> string(%d) "%d" } More error handling Single OID Warning: snmpget(): Invalid object identifier: .1.3.6.1.2.1..1.1.0 in %s on line %d bool(false) Single OID in array Warning: snmpget(): Invalid object identifier: .1.3.6.1.2.1...1.1.0 in %s on line %d bool(false) Multiple OID Warning: snmpget(): Invalid object identifier: .1.3.6.1.2.1...1.1.0 in %s on line %d bool(false) noSuchName checks Single OID Warning: snmpget(): Error in packet at '%s': (noSuchName) There is no such variable name in this MIB. in %s on line %d bool(false) Single OID in array Warning: snmpget(): Error in packet at '%s': (noSuchName) There is no such variable name in this MIB. in %s on line %d bool(false) Multiple OID Warning: snmpget(): Error in packet at '%s': (noSuchName) There is no such variable name in this MIB. in %s on line %d array(1) { ["%s"]=> string(%d) "%s" }