标签: php对象转数组
thumbnail

php对象转数组怎么转

在PHP中,可以使用get_object_vars()函数将对象转换为数组。下面是一个示例: class Person { public $name; public $age; } $person = new Person(); $perso……