3 ms·
I hear ya. In fact, I got burned by that problem enough times to make a test for it in my PHPCS 'coding standard'... which is basically a handful of standards t
by narcissus 14y ago
I hear ya. In fact, I got burned by that problem enough times to make a test for it in my PHPCS 'coding standard'... which is basically a handful of standards that look for my stupid, repeated, coding errors :)
- function_seven 14y agoMy own standard is this: foreach ($array as & $ref) { // Do something with $ref } unset ($ref); i.e. put the `unset()` call on the same line as the closing brace, forever "welding" it to that block.