Am 26.01.2022 um 16:55 schrieb Lynn <kja...@gmail.com>:
> I don't want to waste time trying to figure out if an undefined `$j++` is a 
> bug because it should've been `$i++`, or that `$i = 0;` is supposed to be 
> unused because someone forgot to remove it. Given the legacy I work with, 
> it's unrealistic to have static code analysis implemented in these projects 
> within a foreseeable time due to the sheer size. Updating PHP to a newer 
> version will get development time because we can't stay behind, thus 
> enforcing these good standards.

My experience is quite the opposite: Systems will stay on older PHP versions 
for much longer so they do not having to deal with the work. Especially for 
shared hosting services.
Which is even worse in my books.

> Imo convenience is not a good argument to write code that's potentially 
> bugged and harder to grasp for the reader.

This is where we disagree: I think being able to use undefined variables and 
indices avoids boiler plate code and can make it easier to read.

But then again I know that this is all highly dependent on your environment.
I'm only trying to get across that it is IMHO not a clear-cut decision if such 
a change is worth it. That's all.

Regards,
- Chris

Reply via email to