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

pcntl_get_last_error

Description

The pcntl_get_last_error of PCNTL for PHP retrieves the error number set by the last pcntl function which failed.

Syntax

pcntl_get_last_error(): int

Return

Returns error code.

Examples

1 · void

<?

$return = pcntl_get_last_error();

echo $return;
0

2 · error

<?

$flags = CLONE_NEWNS;

pcntl_unshare($flags);

$return = pcntl_get_last_error();

echo $return;
1