Class Test{ public $name='呵呵'; public function __toString(){ return $this->name; } } $t=new Test(); define('TT',$t); echo TT;