hi, On Wed, Jan 19, 2011 at 4:41 PM, Martin Scotta <martinsco...@gmail.com> wrote: > I think the point is that the php language itself does not provide solid > construct for writing rock-solid code. Yes, there are many > programmers/hackers that can, but the effort they put is huge.
Care to enlighten me and tell me what is missing to allow one to write rock-solid code? > it's so easy to break well-written bug-free code, that's impossible for > developers to share libraries, and even those who share has the problems > that the language does not provides the language construct for the system to > evolve without breaking its clients code. I think that most of PHP is actually thread safe. And almost all libraries are now either thread safe or used in a way that makes them thread safe. Now, about making the engine itself and the userland scripts able to implement parallelized functions for multi-core architecture (which is very disputable in a web environment, btw), that's a totally different topic and I don't think it is worth the effort. > I'm really interested on threads for PHP, but as a language construct. > Threads are not easy, even the most experienced programmer could not get it > right from the scratch. Most of the time what PHP needs are non blocking operations, not necessary multi threaded operations. That's what some of the newly implemented features do (like in mysqlnd, to fetch the data). > IMHO, as a simple PHP programmer, the language should provide the simplest > language construct and the engine should handle all the complexity under the > hood. Honestly if a given part of an application needs something along this line for performance reasons, then doing that on the same box where the request is executed may be a bad idea. Tools like gearman will do a far better jobs and will let you do resource intensive processing on other machines where cores may not be already busy serving other requests. my 2 cents based on my experiences and benches in this area, Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php