private function peek(array $charArray, int $currPosition)
    {
        $charArrayLength = count($charArray);

        if ($charArrayLength === 0 || $charArrayLength === $currPosition + 1) {
            return null;
        }

        return $charArray[$currPosition + 1];
    }
private function peek(array $charArray, int $currPosition)
    {
        $charArrayLength = count($charArray);

        if ($charArrayLength === 0 || $charArrayLength === $currPosition + 1) {
            return null;
        }

        return $charArray[$currPosition + 1];
    }
private function peek ( array $ charArray , int $ currPosition ) { $ charArrayLength = count ( $ charArray ) ; if ( $ charArrayLength === 0 || $ charArrayLength === $ currPosition + 1 ) { return null ; } return $ charArray [ $ currPosition + 1 ] ; }
Peeks at the next character in the string

@param array $charArray The char array
@param int $currPosition The current position
@return string|null The next character if there is one, otherwise null
Peeks at the next character in the string