Yes Marco has right.
But more than that, OOP is mainly designed to run in a single threaded
environment and it is not the best idea to be used for concurrent
programming because you will need synchronization everywhere and this slows
down the code, but also ask for a lot of other troubles.
I think functional paradigm is more better suited for concurrent
programming, and there are some nice features in PHP 5.4
please see "Closures" and how "callbacks" can be used in PHP. Functional
features are prepared for Java 8, and they are already in C++11.
On Wed, Oct 31, 2012 at 10:44 AM, ma...@behnke.biz <ma...@behnke.biz> wrote:
> "Florian Müller" <florian-muel...@outlook.com> hat am 31. Oktober 2012 um
> > Hi guys
> > I was wondering, what actually the reason is that PHP itself does not
> > multi-threading?
> > I guess this would be realizable, or not? If not, why?
> > Maybe this is a stupid question, but still somehow interesting.
> Realization in
> > a way as Java does (or just something in that way) would actually be a
> > nice thing, don't you think?
> > Thank you for your answers :)
> That is because most parts of the PHP code is not threadsafe.
> > Florian
> Marco Behnke
> Dipl. Informatiker (FH), SAE Audio Engineer Diploma
> Zend Certified Engineer PHP 5.3
> Tel.: 0174 / 9722336
> e-Mail: ma...@behnke.biz
> Softwaretechnik Behnke
> Heinrich-Heine-Str. 7D
> 21218 Seevetal
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Cu respect / Best regards,
Dipl.-Ing. Ovidiu Farauanu