Hello Florian,

Usually you want to run a PHP script in two different environments:
1. inside a webserver
2. in a command line interface

For a web application, the application server does the work for you.
It is the server job to have a thread pool and balance it correctly.
So you don't need threads for the same reason threads are prohibited in
Java EE containers.
I assume that you don't fork multiple threads for every single HTTP request
inside a Java Servlet, for instance.

When you are inside a command line usually you start processes instead of
And this is fully supported by PHP.
However, there are several reasons in choosing processes instead of threads.
Several high-level programming languages are starting OS processes for
language threads.
But maybe this is not on our topic now.

But I am wondering what do you mean by "multithreading support"?
Do you need library functions as synchronization primitives?
Or you are talking about something like "synchronized" keyword?

On Wed, Oct 31, 2012 at 8:58 AM, Florian Müller <florian-muel...@outlook.com
> wrote:

> Hi guys
> I was wondering, what actually the reason is that PHP itself does not
> support 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 very nice thing, don't you think?
> Thank you for your answers :)
> Florian

Cu respect / Best regards,
Dipl.-Ing. Ovidiu Farauanu

Reply via email to