admiyn/sequential-alphanumeric-generator — pull request #1 by LukasStribrny (2014-11-24 04:24:55+00:00)
Title: Function corrected

Correction made in :
line 11 :
if($code_array[$i] == "Z")
changed to
if($code_array[$i] == end($chars))

line 23 :
if($code_array[$i -1] != 'Z')
changed to
if($code_array[$i -1] != end($chars))

line 32 :
$code_array[$j] = 0;
changed to
$code_array[$j] = reset($chars);

Because it detect last and first character/value in array
The generation was wrong.
For example when it should generate string BA, the function generated B0 instead.
Anyway the function is now working correctly.