/** * Recursively removes entries containing ':unknown' in key from input array. * * @param array $in the input array * @return array the filtered array */ function _filterUseless($in) { $out = array(); if (is_array($in)) { foreach ($in as $key => $value) { if (strpos($key, 'unknown:') === false && !in_array($key, PhotoQExif::_getUselessTagNames())) { if (is_array($value)) { $out[$key] = PhotoQExif::_filterUseless($value); } else { $out[$key] = PhotoQExif::_sanitizeExifValue($value); } } } } return $out; }