(PHP 5 >= 5.4.0)
SNMP::getErrno — Get last error code
Returns error code from last SNMP request.
Returns one of SNMP error code values described in constants chapter.
Exemplo #1 SNMP::getErrno() example
<?php
$session = new SNMP(SNMP::VERSION_2c, '127.0.0.1', 'boguscommunity');
var_dump(@$session->get('.1.3.6.1.2.1.1.1.0'));
var_dump($session->getErrno() == SNMP::ERRNO_TIMEOUT);
?>
O exemplo acima irá imprimir:
bool(false) bool(true)