(PECL pthreads < 3.0.0)
Threaded::getTerminationInfo — Error Detection
This method has been removed in pthreads v3.
Retrieves terminal error information from the referenced object
この関数にはパラメータはありません。
array containing the termination conditions of the referenced object
例1 Detecting fatal errors in Threads
<?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) }