The strings are incremented per character and each character position can be one of 3 modes:
1. [A-Z] uppercase
2. [a-z] lowercase
3. [0-9] decimal
you can mix any combination of the modes and (at least in right to left languages like english) it always increments from the right overflowing leftwards
the mode/type of character that overflows remains the mode/type of the first (0 index) position.
so: input 'zZ9' & 'aaA0' is returned
so: input 'Z9z' & 'AA0a' is returned
so: input '9zZ' & '10aA' is returned
Example:
<?php
$str = 'zZ9'; echo $str = str_increment($str).PHP_EOL; $str = 'Z9z'; echo $str = str_increment($str).PHP_EOL; $str = '9zZ'; echo ($str = str_increment($str)); ?>