I have read that PHPs “probable” weakness is how it handles “concurrency”. With only sessions and cookies to keep track of user state, how can PHP handle the following situations with high accuracy:
-
multiple users check out with one item that has only 1 stock in inventory (sorry for grammar mistakes, but you pretty much get the picture already)
-
multiple users logging into the same user account using the same login details
-
multiple users editing an the same image at the same time (though this rarely happens in real life)
or any other transactions that demands multiple thread handling
(I apologize if I misused terms here)
These aren’t real concurrency issues. While it’s true that PHP as an environment lacks in thread capability, any web server utilizing a PHP module will have multiple threads, each with thier own active PHP environment inside it, all utilizing the same resources. You would run into these problems with Java, .Net, Perl, or any other web application language.
As far as I’m aware, no language uses threads to accomplish any of these tasks. Because of the stateless nature of HTTP communication, cookies are sessions are a mainstay of every web language, so no matter what platform you use, you’re going to see very much the same strategy in all of them for handling a given problem.