(PECL pthreads < 3.0.0)
Threaded::getTerminationInfo — 锟斤拷锟斤拷锟斤拷
pthreads v3 锟斤拷锟斤拷锟狡筹拷锟剿凤拷锟斤拷锟斤拷 锟斤拷锟解,Threaded::run() 锟叫的达拷锟诫, 应锟斤拷使锟斤拷 try...catch 锟斤拷锟斤拷锟斤拷锟届常锟斤拷猓拷锟轿拷锟� PHP 7 锟叫大部凤拷 error 锟斤拷锟斤拷为锟阶筹拷锟届常锟侥凤拷式锟剿o拷锟斤拷
锟斤拷锟截讹拷锟斤拷锟斤拷斩舜锟斤拷锟斤拷锟较�
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
锟斤拷锟斤拷锟秸讹拷锟斤拷息锟斤拷锟斤拷锟斤拷锟斤拷锟�
Example #1 锟斤拷锟斤拷叱锟斤拷锟斤拷锟绞憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟�
<?php
class My extends Thread {
public function run() {
@not_found();
}
}
$my = new My();
$my->start();
$my->join();
var_dump($my->isTerminated(), $my->getTerminationInfo());
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
bool(true) array(4) { ["scope"]=> string(2) "My" ["function"]=> string(3) "run" ["file"]=> string(29) "/usr/src/pthreads/sandbox.php" ["line"]=> int(4) }