PHP 8.1.28 Released!

SNMP::getErrno

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

SNMP::getErrnoGet last error code

Descrizione

public SNMP::getErrno(): int

Returns error code from last SNMP request.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns one of SNMP error code values described in constants chapter.

Esempi

Example #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);
?>

Il precedente esempio visualizzerà:

bool(false)
bool(true)

Vedere anche:

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top