As shown in the following code:
$str = ' W '; for ($i =0; $i <6; $i + +) {echo + + $str. "\ r \ n";}
The following results will appear:
It's because PHP is dealing with strings that follow Perl's habits, not C's.
For example
In Perl $a = ' Z '; $a + +; will turn $a into ' AA '
In C,a = ' z '; a++; will turn a into a ' ['(' z ' ASCII value is all,' [' the ASCII value is 91).
Character variables can only be incremented, not decremented, and only plain letters (A-Z and A-Z) are supported. Increment/Decrement Other character variables are not valid and the original string does not change.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The above describes the increment of the string in PHP, including the contents of the content, I hope that the PHP tutorial interested in a friend helpful.