News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

David Müller's Blog:
Parallel processing in PHP
March 31, 2011 @ 13:41:37

In a recent post to his blog David Müller has taken a look at parallel processing in PHP using a few different methods - system calls, fork, and curl.

Since PHP does not offer native threads, we have to get creative to do parallel processing. I will introduce 3 fundamentally different concepts to emulate multithreading as good as possible.

For each of the technologies mentioned above, he provides a simple bit of sample code that does simple tasks like echoing out strings and writing to files. He also includes some benchmarks (take them with a grain of salt) of the three different methods showing how many iterations they could run through in ten seconds. He includes the benchmarking script if you'd like to try it out yourself.

0 comments voice your opinion now!
parallel processing tutorial system fork curl benchmark


blog comments powered by Disqus

Similar Posts

Gergely Hodicska's Blog: What's new in PHP 5.3 - part 1: namespaces

DevShed: Working with Prepared Queries with PDO Objects in PHP 5

ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 6

DevShed: Comparing Files and Databases with PHP Benchmarking Applications

Michael Nitschinger's Blog: A primer on PHP exceptions


Community Events





Don't see your event here?
Let us know!


tips code podcast development zendserver language list community interview introduction series release conference developer threedevsandamaybe deployment laravel framework application api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework