How can one use multi threading in PHP applications

Is there a realistic way of implementing a multi-threaded model in PHP whether truly, or just simulating it. Some time back it was suggested that you could force the operating system to load another instance of the PHP executable and handle other simultaneous processes.

The problem with this is that when the PHP code finished executing the PHP instance remains in memory because there is no way to kill it from within PHP. So if you are simulating several threads you can imagine whats going to happen. So I am still looking for a way multi-threading can be done or simulated effectively from within PHP. Any ideas?

Edit: link removed.

Why are you trying to use multi-threading in PHP? Also, you appear to be trying to make a standalone application in it as well. Why?

This is likely a terrible place to ask PHP questions

2 Likes

Looks like a clever spam bot trying to link spam the book.

It’s vaguely more interesting then the usual furniture sales we get.

3 Likes

Also reminds me of periodical surges of spam in korean and arabic.

1 Like

hmm yeah i didn’t notice the links in the text but pretty sure you are @Kiwasi . But i found a better solution which is to just not use PHP since on the server side you can use what ever you want and there are much better alternatives.

It is; http://stackoverflow.com/questions/70855/how-can-one-use-multi-threading-in-php-applications

And i think this (algorithm) is an update for new spambots; to make some “believable” posts until approved, and ready to start the real spamming. Looks like they get some (random?) question from net and post it to another forum. Kinda clever, but i wonder if it’s real ai or preconfigured list of sites.

edit: didn’t get the book reference you mentioned, but after checking the link, yeah looks like it. However i thought this was spam (i know some php and googled the question out of curiosity, and ended up to stackoverflow question from 2008), and i guess my comment still stands …at least sometime soon.

“Since PHP uses multi-threading, should Unity replace c# with PHP? Discuss…”

5 Likes