In PHP and C#, why foreach doesn't have a built-in check for null array/list?
In PHP, C# and may be other languages, why aren't languages developed to reduce writing code that isn't really necessary? Why for example foreach perform a loop on null array or list? I'm not a professional programmer, but I think…