CakeFest 2025 Madrid: The Official CakePHP Conference

pcntl_errno

(PHP 5 >= 5.3.4, PHP 7, PHP 8)

pcntl_errnoAlias of pcntl_get_last_error()

Description

This function is an alias of: pcntl_get_last_error()

add a note

User Contributed Notes 1 note

up
-1
renmengyang567 at gmail dot com
6 years ago
<explain>
This example installs an alarm signal, but the callback function does not exist,This will set the last error. Then we will print out the last error.

<?php
set_error_handler
(function(){});
pcntl_signal(SIGALRM,'sig_handler',false);
print
'Your error returned was (Code):'.pcntl_get_last_error().PHP_EOL;
print
'Your error info:'.pcntl_strerror(pcntl_get_last_error()).PHP_EOL;
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant