How to get PID of a background process in PHP?
Question
php file.php &
How to get PID of the background process in file.php
?
Solution
I believe you're looking for the function getmypid()
http://php.net/manual/en/function.getmypid.php
posix_getpid()
seems to do the same thing...
OTHER TIPS
getmypid()
does what you need.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow