Reputation: 516
I have a php function and i want it to work asynchronously.
function my_function1(){
//some code
my_async_func();
}
function my_async_func(){
// doing background task
}
any help is most welcome
i have visited PHP threading call to a php function asynchronously
but i don't want to use php threading
Upvotes: 0
Views: 476
Reputation: 17772
You can't, php is not meant to work that way.
You can run a separate background process, which checks database for jobs to be done and does them. But that is not true async. It's just a background worker.
Upvotes: 1