We would like to check if a specified process is currently running via PHP.
We would like to simply supply a PID and see if it is currently executing or not.
If you want to have a function for it then:
$running = posix_kill($pid,0);
Send the signal sig to the process with the process identifier pid.
Calling posix_kill with the 0 kill signal will return true if the process is running, false otherwise.
true
false