public function distance($text1, $text2)
    {
        $distance = 0;
        $strLength = strlen($text1);
        for($index = 0; $index < $strLength; $index++)
        {
            if($text1[$index] != $text2[$index]) { 
                $distance++;
            }
        }
        return $distance;
    }