Why is that
Oddly enough, the answer to the question you can find in the documentation for the operator ++
PHP follows Perl conventions (as opposed to C) to perform arithmetic operations on character variables. For example, in PHP and Perl $ a = 'Z'; $ a ++; assigns $ a to 'AA', while in C a = 'Z'; a ++; will assign a to the value '[' (the ASCII value of 'Z' is 90, and the ASCII value of '[' is 91). It should be noted that an increment operation can be applied to character variables, while a decrement operation cannot be used, moreover, only ASCII characters (az and AZ) are supported. An attempt to increment / decrement other character variables will have no effect, the original string will remain unchanged.
-
How to fix it?
As follows from the documentation, only ASCII characters are supported, in your case, the Russian letter А
is in the text. Replacing it with English, you can achieve the desired behavior. If you wanted to increment the Russian alphabet, you will have to use other methods (with getting the letter code).
PS: I did not know that they can be incrementally: D