PHP - Fonction Thread :: getCreatorId ()

Thread :: getCreatorId - Identification

Syntaxe

public integer Thread::getCreatorId( void )

La fonction Thread :: getCreatorId () peut renvoyer une identité de Thread qui a créé un Thread référencé.

La fonction Thread :: getCreatorId () n'a aucun paramètre et peut renvoyer une identité numérique.

Exemple

<?php
   class My extends Thread {
      public function run() {
         printf("%s created by Thread #%lu\n", __CLASS__, $this->getCreatorId());
      }
   }
   $my = new My();
   $my->start();
?>