pcntl_getcpu
PHP function
Edit on GitHub ✎
(PHP 8 >= 8.4.0)
Get the CPU number on which the calling process last executed
Description
pcntl_getcpu(): int
pcntl_getcpu() returns the number of the CPU on which the calling process was last executed. This function uses the sched_getcpu(3) system call available on Linux.
Parameters Parameters
Return Values
Returns the CPU number as an Integer.