Looking at PHP5 authority programming, see a description of a string increment:
Strings (non-numeric) are incremented in the same way as Perl. If the last letter is a literal or a number, it will be incremented by 1. If the last letter is ' z ', ' z ' or ' 9 ', it will be added to ' a ', ' a ' or ' 0 ', and the previous text or number will be incremented in the same way. If there is no previous text or number, it will be preceded by ' a ', ' a ' or ' 0 ', respectively. Don't feel like learning this a little headache, you just have to try and run it, you will soon master it.
Note: Non-numeric strings cannot be decremented.
At first glance, it seems to be hard to understand. But it's easy to understand a few examples:
$a = ' a '; $A = ' a '; $z = ' Z '; $Z = ' Z '; $az = ' AZ '; $AZ = ' AZ '; $aZ = ' AZ ';echo + + $a;//becho + + $A; Becho + + $z; Aaecho + + $Z; Aaecho + + $az; Baecho + + $AZ; Baecho + + $aZ; BA
As you can see from the results, the addition and subtraction of strings is very similar to the addition and subtraction of numbers.
PHP string Increment