peb_errno — Returns the numerical value of the error message from previous peb operation
Returns the error number from the last peb function.
Returns the error text from the last peb function. Note that this function only returns the error text from the most recently executed peb function (not including peb_error() and peb_errno()), so if you want to use it, make sure you check the value before calling another peb function.
Returns the error number from the last peb function, or 0 (zero) if no error occurred.
Example #1 peb_errno() example
<?php
$link = peb_connect('node@host.domain', 'secret_cookie');
if (!$link) {
die('Could not connect: ['
.
peb_errno()
.
']'
.
peb_error()
);
}
echo 'Connected successfully';
peb_close($link);
?>
The above example will output something similar to:
Could not connect: [2] ei_connect error