php中如何找到对象所属的类?_百度知道
最佳答案: class Animal {} class Cat extends Animal { public function get_class_name(){ return __CLASS__; } } $obj=new Cat(); echo $obj->get_...更多关于php是如何找到要实例的对象的的问题>>
php 中如何得到一个对象的类型_百度知道
[专业]答案:得到一个对象的类型,使用gettype()函数:<?phpechogettype(1);//输出integerechogettype(array());//输出array得到一个对象是哪个类的实例,使用get_...更多关于php是如何找到要实例的对象的的问题>>