I think you didn't wrote backwards compatible code...
Running something that uses these statements on v5.6.1 produces a different result then running the same thing on v5.8.7...
It returns this on v5.6.1:
$array[$y..$z] procudes 'B', all the other produce 'A'. There is also a warning (for all statements but $array[$y..$z]): Argument "" isn't numeric in array element