Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does PHP not support multithreading? [closed]

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.

like image 958
skytreader Avatar asked Aug 27 '12 19:08

skytreader


1 Answers

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.

like image 53
Abid Hussain Avatar answered Sep 29 '22 08:09

Abid Hussain