php stdClass转数组

/**
* stdClass转数组
* @param $object
* @return mixed
*/
function object2array(&$object) {
  $object = json_decode( json_encode( $object),true);
  return $object;
}

原文地址:https://www.cnblogs.com/ljkltt/p/14424222.html