private static function _getTyped($id, $type, &$collection) { $value = @$collection[$id]; if (is_null($value) || !settype($value, $type)) { return null; } if (!is_string($value) && !is_array($value)) { return $value; } return get_magic_quotes_gpc() ? TIP::deepStripSlashes($value) : $value; }