@buddhawilliams@eigenmagic.net
Post #3689522
2026-07-09 07:40 UTC
Moving into the more unused classes in the legacy #PHP codebase, I was just horrified to discover a method about 200 lines long, the reused the variable name $field not once, but twice! moving from an object to an array to a string.
I have renamed the variables to be better, and next week, some refactoring to break that apart. It is doing too much. #refactoring
Replies (1)
-
@djumaka@phpc.social 2026-07-09 08:06
@buddhawilliams@eigenmagic.net I had this in the past, only a single reuse but in the same function I had also some variables h,hh,cc,ch,c,f.... and etc... so "Always look on the bright side of life" - at least your variable name had a meaning :)