On 06.05.2020 at 12:52, G. P. B. wrote: > On Wed, 6 May 2020 at 12:20, Xinchen Hui <larue...@php.net> wrote: > >> mixing declarations and codes sometimes brings unexpected >> varaibles overriden and hard to debugging. > > In a perfect world we would be able to enable the -Wshadow GCC > compiler warning which would shout when such bugs could pop out, > however variable shadowing is pretty common in the engine, and > unless someone knows a way to "baseline" the current warnings such > that only new/refactored code warns it seems like a long shot to get > to a state where we can do that.
Isn't variable shadowing only an issue with nested blocks? -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php