pcntl_wexitstatus

Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Returns the return code of a terminated child
pcntl_wexitstatus(int $status): int|false
        }



        while (
pcntl_waitpid(0$status) != -1) {

            
$status pcntl_wexitstatus($status);

            
$result *= $status;

        }