How to get the object or class name?

后端 未结 2 1126
梦如初夏
梦如初夏 2020-12-03 17:42

Right now, I have this code where $obj_arr maybe contain array and an object.

$obj_temp = array ($obj_identity, $arr_user, $obj_locale, $arr_qu         


        
相关标签:
2条回答
  • 2020-12-03 17:56

    Since PHP 5.5 you can use MyAction::class statement, so you can get a class name without class initialization

    0 讨论(0)
  • 2020-12-03 18:16

    Use get_class to get the class name of an object.

    0 讨论(0)
提交回复
热议问题