根据PHP ts\nts版选择对应pthreads的版本
安装pthreads扩展
测试pthreads扩展
arg = $arg;
}
public function run(){
if($this->arg){
printf("Hello %s\n", $this->arg);
}
}
}
$thread = new AsyncOperation("World");
if($thread->start())
$thread->join();
?> 运行以上代码得到“HelloWorld”,就说明安装pthreads扩展成功!
以上就介绍了wampserver安装pthreads多线程扩展教程,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。