public static function merge_objects($o1, $o2){
    $args = \func_get_args();
    /* @todo check if it's working with more than 2 object arguments */
    if ( \count($args) > 2 ){
      for ( $i = \count($args) - 1; $i > 1; $i-- ){
        $args[$i-1] = self::merge_arrays($args[$i-1], $args[$i]);
      }
      $o2 = $args[1];
    }
    $a1 = self::to_array($o1);
    $a2 = self::to_array($o2);
    $res = self::merge_arrays($a1, $a2);
    return self::to_object($res);
  }