code: public static function objectToArray($mObject) : array
  	{
  		if ( is_object($mObject)) {
  			
  		    $mObject = (array) $mObject;
  		}
  
  
  		if (is_array($mObject)) {
  
  			$aNew = array();
  
  			foreach($mObject as $sKey => $mValues) {
  
  				$sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey);
  				$aNew[$sKey] = self::objectToArray($mValues);
  			}
  		}
  		else {
  
  			$aNew = $mObject;
  		}
  
  		return $aNew;
  	}
docs: create an array with an object
  
  @access public
  @param $mObject
  @return array