src/AsYouTypeFormatter.php
public function inputDigit($nextChar)
    {
        $this->currentOutput = $this->inputDigitWithOptionToRememberPosition($nextChar, false);
        return $this->currentOutput;
    }
public function inputDigit($nextChar)
    {
        $this->currentOutput = $this->inputDigitWithOptionToRememberPosition($nextChar, false);
        return $this->currentOutput;
    }
public function inputDigit ( $ nextChar ) { $ this -> currentOutput = $ this -> inputDigitWithOptionToRememberPosition ( $ nextChar , false ) ; return $ this -> currentOutput ; }
Formats a phone number on-the-fly as each digit is entered.

@param string $nextChar the most recently entered digit of a phone number. Formatting characters
are allowed, but as soon as they are encountered this method foramts the number as entered
and not "as you type" anymore. Full width digits and Arabic-indic digits are allowed, and will
be shown as they are.
@return string The partially formatted phone number
Formats a phone number on - the - fly as each digit is entered .