Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Type must be a single character

Description

The type argument of the snmp2_set() function is a list of types: one or more. Each type must a string of a single character, no more, no less.

The allowed values are : ‘=’, ‘i’, ‘u’, ‘s’, ‘x’, ‘d’, ‘n’, ‘o’, ‘t’, ‘a’, ‘b’, ‘U’, ‘I’, ‘F’, ‘D’.

Example

<?php

    $z = snmp2_set(hostname: $hostname, 
                   community: $communityWrite, 
                   object_id: array($oid1, $oid2), 
                   type: array('s','sb'), 
                   value: array($newvalue1, $newvalue2), 
                   );

?>

Alternatives

  • Remove any invalid type.
  • Remove types that are more than one character.
  • Remove types that are less than one character.