Skip to content

Tag: multithreading

Running async function in php

is it possible to create some php class which can run functions asynchronously? Here is what I have done so far: Here is how I want to call it: Answer Recent versions of pthreads support closures as members, making the code very simple: However, this is horrible, it’s hard to imagine any function that i…