The Little Guy Posted May 6, 2011 Share Posted May 6, 2011 I have been searching Google on PHP Threads, I am getting mixed thoughts. Is Multi Threading in PHP Possible? Some say no, some say yes and some say you need to make a workaround. What is the real answer? Link to comment https://forums.phpfreaks.com/topic/235733-php-threads/ Share on other sites More sharing options...
xyph Posted May 6, 2011 Share Posted May 6, 2011 PHP is compiled real-time, so multi-threading WITHIN PHP itself doesn't make sense in my head. Here's a solution here: http://www.phpclasses.org/package/3953-PHP-Emulate-threads-using-separate-HTTP-requests.html I have done a couple of 'manual' php multi-thread projects, mostly for bulk email sending. I have a 'controller' script with, say, 10 i-frames or AJAX calls within it. Each one calls the same page with different input variables. It's a pseudo multi-thread. Link to comment https://forums.phpfreaks.com/topic/235733-php-threads/#findComment-1211686 Share on other sites More sharing options...
MadTechie Posted May 6, 2011 Share Posted May 6, 2011 Simply put. the answer is NO, However their are whys to simulate multi-threading but they are NOT really multi-threads, for example, opening a connection to itself or start a another child process (see pcntl_fork), etc etc Link to comment https://forums.phpfreaks.com/topic/235733-php-threads/#findComment-1211692 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.