code: public static function getMetaVals(&$args, $defaultMeta = array(), $defaultArgs = array(), $argsToMeta = array())
      {
          $meta = array();
          foreach ($args as $i => $v) {
              if (\is_array($v) && isset($v['debug']) && $v['debug'] === Debug::META) {
                  unset($v['debug']);
                  $meta = \array_merge($meta, $v);
                  unset($args[$i]);
              }
          }
          $args = \array_values($args);
          if ($defaultArgs) {
              $args = \array_slice($args, 0, \count($defaultArgs));
              $args = \array_combine(
                  \array_keys($defaultArgs),
                  \array_replace(\array_values($defaultArgs), $args)
              );
          }
          foreach ($argsToMeta as $argk => $metak) {
              if (\is_int($argk)) {
                  $argk = $metak;
              }
              $defaultMeta[$metak] = $args[$argk];
              unset($args[$argk]);
          }
          $meta = \array_merge($defaultMeta, $meta);
          return $meta;
      }
docs: Extracts meta-data from args
  
  Extract meta-data added via meta() method..
  all meta args are merged together and returned
  meta args are removed from passed args
  
  @param array $args        args to check
  @param array $defaultMeta default meta values
  @param array $defaultArgs default arg values
  @param array $argsToMeta  args to convert to meta
  
  @return array meta values