©
이 문서에서는 PHP 중국어 웹사이트 매뉴얼 풀어 주다
(PECL pthreads >= 2.0.0)
Worker::stack — 栈操作
&$work
)将对象入栈到 Worker 对象
work
要被 Worker 执行的Threaded 派生对象
Worker 对象栈的长度
Example #1 向 Worker 中入栈对象并执行
<?php
class Work extends Threaded {
public function run (){
}
}
$my = new Worker ();
$work = new Work ();
var_dump ( $my -> stack ( $work ));
?>
以上例程会输出:
int(1)