Multi-threaded PHP
by Alex Papadimoulis
in CodeSOD
on 2007-08-13
Despite what our teachers may have said, there is such a thing as a stupid question. And generally, newbies are the ones asking ‘em. I know I sure did (thankfully, under a pseudonym). But unlike the mean-old folks who would often answer my questions (“RTFM, idiot!”), I don’t believe in picking on those trying to learn. In fact, today, it’s time to pick on someone trying to teach…
Gonzalo Larralde pointed me to discussion on a coding messageboard where a poster asked a fairly simple, naïve question: “How do I create a multithreaded application using PHP. i want to write scripts that run parallelly.” As I’ve discussed before (see Pounding A Nail: Old Shoe or Glass Bottle?), my response would have been an explanation of what’s fundamentally wrong with such a question. Another poster, however, had a different answer…