public static function cleanKey($varValue)
	{
		// Recursively clean arrays
		if (\is_array($varValue))
		{
			$return = array();

			foreach ($varValue as $k=>$v)
			{
				$k = static::cleanKey($k);

				if (\is_array($v))
				{
					$v = static::cleanKey($v);
				}

				$return[$k] = $v;
			}

			return $return;
		}

		$varValue = static::decodeEntities($varValue);
		$varValue = static::xssClean($varValue, true);
		$varValue = static::stripTags($varValue);

		return $varValue;
	}
public static function cleanKey($varValue)
	{
		
		if (\is_array($varValue))
		{
			$return = array();

			foreach ($varValue as $k=>$v)
			{
				$k = static::cleanKey($k);

				if (\is_array($v))
				{
					$v = static::cleanKey($v);
				}

				$return[$k] = $v;
			}

			return $return;
		}

		$varValue = static::decodeEntities($varValue);
		$varValue = static::xssClean($varValue, true);
		$varValue = static::stripTags($varValue);

		return $varValue;
	}
public static function cleanKey ( $ varValue ) { // Recursively clean arrays if ( \ is_array ( $ varValue ) ) { $ return = array ( ) ; foreach ( $ varValue as $ k => $ v ) { $ k = static :: cleanKey ( $ k ) ; if ( \ is_array ( $ v ) ) { $ v = static :: cleanKey ( $ v ) ; } $ return [ $ k ] = $ v ; } return $ return ; } $ varValue = static :: decodeEntities ( $ varValue ) ; $ varValue = static :: xssClean ( $ varValue , true ) ; $ varValue = static :: stripTags ( $ varValue ) ; return $ varValue ; }
Sanitize the variable names (thanks to Andreas Schempp)

@param mixed $varValue A variable name or an array of variable names

@return mixed The clean name or array of names
Sanitize the variable names ( thanks to Andreas Schempp )