• PHP Video Tutorials

PHP - Threaded::isTerminated() Function



Threaded::isTerminated - State Detection.

Syntax

public boolean Threaded::isTerminated( void )

Threaded::isTerminated function can tell if a referenced object is terminated during execution, suffered fatal errors, or throw uncaught exceptions.

Threaded::isTerminated function doesn't have any parameters and can return a boolean indication of state.

Example

<?php
   class My extends Thread {
      public function run() {
         i_do_not_exist();
      }
   }
   $my = new My();
   $my->start();
   $my->join();
   
   var_dump($my->isTerminated());
?>
php_function_reference.htm
Advertisements