Thinking that PHP supports a character data type

<?php
for ($c = 'a'; $c <= 'z'; $c++) {
    echo $c . "\n";
}
?>

In PHP there’s no char datatype; only string is available. With that in mind, incrementing the string z in PHP yields aa:

<?php
> $c = 'z'; echo ++$c . "\n"; aa
?>

That being the case, here’s one way to properly loop through the values ‘a’ through ‘z’ in PHP:

<?php
for ($i = ord('a'); $i <= ord('z'); $i++) {
    echo chr($i) . "\n";
}
?>

https://www.toptal.com/php/10-most-common-mistakes-php-programmers-make