News Feed
Sections




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

Software Gunslinger:
PHP is meant to die, continued
April 26, 2013 @ 09:15:56

In his previous post ("PHP was meant to die") the point was made that PHP isn't really designed as a language to handle long running processes very well. It's made to handle a few operations and then die at the end of the request. In this follow up post he talks more about using PHP for long running processes and a library that could help.

Yes, I already acknowledged that PHP has a garbage collection implementation starting 5.3.0 and up (opt-in or opt-out, that's not the problem). I also acknowledge that garbage collection works, and is able to take care of most circular references just fine. [...] Anyway, as previously stated too, garbage collection is a great thing, but not enough for PHP. It's a borrowed feature that does not play well with old fundamental decisions inherited from the original design. Garbage collection is not a magical solution for every problem, like many tried to argue about. Let's illustrate with another example.

His example uses the React PHP library (a non-blocking I/O platform) to handle a lot of incoming data to a port and report back some memory usage and limit settings. He explains a bit about what's happening and shares the results of the test, including the end result - a fatal error when the memory limit was hit. He still comes to the same conclusion, ultimately...PHP is just not the language to use for long-running processes that do any large amount of work.

0 comments voice your opinion now!
react die longrunning process testing socket server memory limit

Link: http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued

blog comments powered by Disqus

Similar Posts

Sebastian Bergmann\'s Blog: PHPUnit Talk at PHP Usergroup Munich

Arnold Daniels' Blog: Migrating from PHP4 to PHP5: A strategy for hosts

Brett Bieber's Blog: Chiara_PEAR_Server Release Droplet for Mac OS X

Chris Shiflett\'s Blog: Agile PHP Testing at PHP Quebec

PHPFreaks.com: Microsoft Q&A: Running PHP on Windows Server 2008


Community Events





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


bugfix threedevsandamaybe application series library introduction laravel framework code release configure podcast community interview list install developer api language wordpress

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