public static function isBasedOnUsername($word, $username)
	{
		$word     = self::normalize($word);
		$username = self::normalize($username);

		$words   = array();
		$words[] = $username;
		$words[] = strrev($username);

		foreach ($words as $w)
		{
			if (empty($w))
			{
				continue;
			}

			if (empty($word))
			{
				continue;
			}

			if (strpos($w, $word) !== false)
			{
				return true;
			}
		}

		return false;
	}
public static function isBasedOnUsername($word, $username)
	{
		$word     = self::normalize($word);
		$username = self::normalize($username);

		$words   = array();
		$words[] = $username;
		$words[] = strrev($username);

		foreach ($words as $w)
		{
			if (empty($w))
			{
				continue;
			}

			if (empty($word))
			{
				continue;
			}

			if (strpos($w, $word) !== false)
			{
				return true;
			}
		}

		return false;
	}
public static function isBasedOnUsername ( $ word , $ username ) { $ word = self :: normalize ( $ word ) ; $ username = self :: normalize ( $ username ) ; $ words = array ( ) ; $ words [ ] = $ username ; $ words [ ] = strrev ( $ username ) ; foreach ( $ words as $ w ) { if ( empty ( $ w ) ) { continue ; } if ( empty ( $ word ) ) { continue ; } if ( strpos ( $ w , $ word ) !== false ) { return true ; } } return false ; }
Check if a word is based on a username

@param   string  $word
@param   string  $username
@return  bool
Check if a word is based on a username