I know in Pocketmine-API, there is a abstract class called Thread. And I should extends it and add the function "start()". But it doesn't work.
You should override the run() function in the thread class, and use $thread->start() to start the thread.
I guess the object $t goes out of scope and gets destroyed by the garbage collector before it finishes executing. Make a property $t in the class ttm and assign the thread object to $this->t and see if it works. That way there will always be a reference to the object.