PHP: array_map on object?

后端 未结 3 1610
醉话见心
醉话见心 2020-12-20 15:26

I\'m trying to write a function that formats every (string) member/variable in an object, for example with a callback function. The variable names are unknown to me, so it m

3条回答
  •  长情又很酷
    2020-12-20 15:51

    You are looking for get_object_vars / get_class_methods (the first gets the variables, the second the method names).

提交回复
热议问题