I am newbie in php. i want to run program in asynchronous. I know php is a synchronise language. but my project needs asynchronous. some one says using pthreads it's possible but i don't know how to do that. so please any one can let me know how to use pthreads or any other way to use php asynchronous.
Asked
Active
Viewed 80 times
0
-
1related, if not a dup: https://stackoverflow.com/questions/13846192/php-threading-call-to-a-php-function-asynchronously – Jeff Aug 27 '18 at 10:37
1 Answers
1
You should start an asynchronous command line php script.
using exec() function.
Example
exec(“php asyn.php”.” > /dev/null 2>/dev/null &“);

Raj
- 66
- 9