I've read everywhere that PHP does not support multithreading but there are workarounds. But why does PHP not support multithreading? For a server-side scripting language, that seems like a glaring omission.
Read this URL i think it is help full to you.
PHP Multithreading – Faking It
http://w-shadow.com/blog/2007/08/20/php-multithreading-faking-it/
PHP doesn’t really support multi-threading per se but there are ways to do “fake” multithreading. Here’s one I saw in the PHPClasses.org newsletter –
Multi-thread Simulation.
Note that this class is intedend for use on a webserver, as opposed to running PHP scripts from a command line (or similar). Check the end of this post for some alternatives you can try if you’re using PHP as a stand-alone scripting language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With