Multithreading in PHP

Some postings have emerged that discuss the implementation of threads in PHP. John recently referred to an article published in the English PHP Magazine and Georg wrote some valuable comments.

Shane did some work on a threads extension available in PECL a couple of months ago. The extension is very experimental.

There’s no plan to incorporate multithreading into PHP5 – if we believe the experts :)

I am not sure about how SRM can help with multithreading. At least it provides persistency across requests which allows to emulate a multithreading environment yourself in PHP (left aside if it’s a good idea e.g. to implement priority management of “threads” in PHP itself and not the Zend engine). Comments are welcome.

What’s missing is a threads implementation similar to Java or Ruby, especially with features like:
– set and manage the priority of threads
– define threads as daemons
– allow for synchronized threads (see Ruby’s Mutex Class)

About Sandro Groganz

Sandro Groganz is an expert in the field of marketing open-source products. He co-founded Age of Peers, a global communications agency for organizations in Open Source. He served as Head of Marketing at Magnolia, creator of the open web content management system Magnolia CMS, Vice President of Marketing at Mindquarry, an open source startup financed by Hasso Plattner Ventures, and Vice President of Communication at eZ Systems, the creator of the open source content management system eZ Publish.

Facebook Comments