update : 2015.11.03
php.shukuma.com

검색:
 
 
Error Detection

Threaded::getTerminationInfo

(PECL pthreads >= 2.0.0)

Threaded::getTerminationInfoError Detection

설명

public array Threaded::getTerminationInfo ( void )

Retrieves terminal error information from the referenced object

인수

이 함수는 인수가 없습니다.

반환값

array containing the termination conditions of the referenced object

예제

Example #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)
}