SyntaxFix
Write A Post
Hire A Developer
Questions
Just in case somebody still lands here looking for an answer. It can be done using plain PHP. An easier way is to reverse-json the object.
function objectToArray(&$object) { return @json_decode(json_encode($object), true); }