php8.5
Home/ Manual/ gnupg / functions/ gnupg_geterror

gnupg_geterror

PHP function Edit on GitHub ✎

(PECL gnupg >= 0.1)

Returns the errortext, if a function fails

Description

gnupg_geterror(resource $identifier): string|false

Parameters

identifier

Identifier

Return Values

Returns an errortext, if an error has occurred, otherwise false.

Examples

Procedural gnupg_geterror() example

php
<?php
$res = gnupg_init();
echo gnupg_geterror($res);
?>

OO gnupg_geterror() example

php
<?php
$gpg = new gnupg();
echo $gpg->geterror();
?>

Source: reference/gnupg/functions/gnupg-geterror.xml · from the official PHP manual (php/doc-en)