HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

curl_errno

Description

The curl_errno of cURL for PHP return the last error number.

Syntax

curl_errno(
    CurlHandle $handle
): int

Parameters

handle

A cURL handle returned by curl_init().

Return

Returns the error number or 0 (zero) if no error occurred.

Examples

1 · handle

<?

$handle = curl_init();

    curl_setopt($handle, CURLOPT_URL, "https://error.osbo.com/");

    curl_exec($handle);

    if($return = curl_errno($handle))
    {
        echo $return;
    }

curl_close($handle);
6