PHP Multi-threading project (server-client application)

PHP was built to be a web scripting language. It is not meant to be multi-threading as the web servers it runs on already handles the multi-threading and the server-client aspect. If you are thinking about working on a PHP project which involves multi-threading and server-client architecture, think about using the web server to handle that and using HTTP protocol.

I would recommend using another language (C, C++ or Java for example) to build a server-client application.

If, for technical reasons you cannot use another language and you cannot build your application on top of HTTP, then there are ways to do multi-threading but I would not count on the stability and performance.

Start here if you really want to try it out in PHP:
http://www.google.ca/search?q=php+multithreading

hi

thanks a lot

Project

It was very good article and thanks for tips. It helped me. Thanks for sharing.

Thanks for the tips!

Thanks for the PHP tips. I've just started programming with it, and I've got so much to learn. Sites like this are helpful.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You may post PHP code. You should include <?php ?> tags.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options