|
|
|
|
|
by zerocrates
586 days ago
|
|
Your $previouslyUndefined thing as something that's changed, as far as I know, isn't true? Unless I've missed some very recent change. If $a is true, that snippet will just execute with no errors. If $a is false you'll get a warning trying to check $previouslyUndefined in the second if. That behavior's been the same for a very long time. The blocks don't matter for scope but the fact that you never executed the line that would have defined the variable does. Similarly, warnings on accessing array keys that don't exist, that's been a thing forever too. Pretty sure both go back with the same behavior to PHP 4, and probably earlier. |
|