Thread::getCurrentThread

(PECL pthreads >= 2.0.0)

Thread::getCurrentThread识锟斤拷

说锟斤拷

public static Thread::getCurrentThread ( void ) : Thread

锟斤拷取锟斤拷前执锟斤拷锟竭程碉拷锟斤拷锟矫★拷

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷示锟斤拷前执锟斤拷锟竭程的讹拷锟斤拷

锟斤拷锟斤拷

Example #1 锟斤拷取锟斤拷前执锟斤拷锟竭筹拷

<?php
class My extends Thread {
    public function 
run() {
        
var_dump(Thread::getCurrentThread());
    }
}
$my = new My();
$my->start();
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

object(My)#2 (0) {
}