1--TEST-- 2Function snmp_set_oid_output_format 3--CREDITS-- 4Olivier Doucet 5--SKIPIF-- 6<?php 7require_once(__DIR__.'/skipif.inc'); 8if (!function_exists('snmp_set_oid_output_format')) die('skip This function is only available if using NET_SNMP'); 9?> 10--FILE-- 11<?php 12require_once(__DIR__.'/snmp_include.inc'); 13 14echo "Checking error handling\n"; 15var_dump(snmp_set_oid_output_format()); 16var_dump(snmp_set_oid_output_format(123)); 17 18echo "Checking working\n"; 19var_dump(snmp_set_oid_output_format(SNMP_OID_OUTPUT_FULL)); 20var_dump(snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC)); 21?> 22--EXPECTF-- 23Checking error handling 24 25Warning: snmp_set_oid_output_format() expects exactly 1 parameter, 0 given in %s on line %d 26bool(false) 27 28Warning: snmp_set_oid_output_format(): Unknown SNMP output print format '123' in %s on line %d 29bool(false) 30Checking working 31bool(true) 32bool(true) 33