← All docs
pcntl_waitid()
Waits for a child state change and writes signal information plus optional PHP 8.5 resource usage.
pcntl_waitid()
function pcntl_waitid(int $idtype = 0, int $id = null, mixed $info = [], int $flags = 4, mixed $resource_usage = []): bool
Waits for a child state change and writes signal information plus optional PHP 8.5 resource usage.
Parameters:
$idtype(int), default0, optional$id(int), defaultnull, optional$info(mixed), passed by reference, default[], optional$flags(int), default4, optional$resource_usage(mixed), passed by reference, default[], optional
Returns: bool
Availability
- Compiled (AOT): supported on the three executable/release hosts (macOS ARM64, Linux ARM64, and Linux x86_64); calls are refused at compile time for iOS library targets.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/pcntl/pcntl_waitid.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how pcntl_waitid is implemented in the compiler, see the internals page.