Threaded
PHP Manual

Threaded::getTerminationInfo

(PECL pthreads >= 2.0.0)

Threaded::getTerminationInfoError Detection

Descrizione

public array Threaded::getTerminationInfo ( void )

Retrieves terminal error information from the referenced object

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

array containing the termination conditions of the referenced object

Esempi

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());
?>

Il precedente esempio visualizzerĂ :

bool(true)
array(4) {
  ["scope"]=>
  string(2) "My"
  ["function"]=>
  string(3) "run"
  ["file"]=>
  string(29) "/usr/src/pthreads/sandbox.php"
  ["line"]=>
  int(4)
}


Threaded
PHP Manual