Check if the two consecutive characters are vowels or consonants
if ( ( isVowel ( $ str [ $ i ] ) && isVowel ( $ str [ $ i + 1 ] ) ) || ( ! isVowel ( $ str [ $ i ] ) && ! isVowel ( $ str [ $ i + 1 ] ) ) ) {