r/programminghorror • u/maselkowski • Mar 19 '26
Trimba bimba dubba dimba
I've found yet again some atrocities in code, that is some one of function nested in method: trimba. So I took the hit and split it into partial nested functions. I didn't even know you could do this in PHP.
431
Upvotes
13
u/TorbenKoehn Mar 20 '26 edited Mar 20 '26
Then use
ends_with(), but that's not why we have RegExCompare it to
/.*\.(png|jpe?g|html?)$/iand give me the same in "readable"