(PECL pthreads >= 2.0.0)
Thread::start — 执行
$options
在独立线程中执行 run 方法
options
成功时返回 true, 或者在失败时返回 false。
true
false
示例 #1 开始线程
<?php class My extends Thread { public function run() { /** ... **/ } } $my = new My(); var_dump($my->start()); ?>
以上示例会输出:
bool(true)