My operating Environment:
System: WINDOWS10, 64-bit
php:5.6.8 Ts,vc11, 32-bit
apache:2.0
I installed the XAMPP integrated environment
pthreads Windows extension Files: http://windows.php.net/downloads/pecl/releases/pthreads/
I downloaded this version of 2.0.9-5.6-ts-vc11-x86.
Installation steps:
1, copy the PthreadVC2.dll to XX disk: \xampp\php\
2, copy the Php_pthreads.dll to XX disk: \xampp\php\ext\
3,php.ini adding Extension=php_pthreads.dll
4, modify Apache configuration file httpd.conf add LoadFile "XX disk:/xampp/php/pthreadvc2.dll"
5, restart Apache
Official Test code:
<?PHPclassAsyncOperationextendsThread { Public function__construct ($arg){ $this->arg =$arg; } Public functionrun () {if($this-Arg) { printf("Hello%s\n",$this-Arg); } }}$thread=NewAsyncOperation ("World");if($thread-start ())$thread-Join();?>
Windows xampp Installing PHP pthreads multithreaded Extensions