4 ms·
When I last tinkered with PHP they did not have lexical scoping. That makes refactoring stuff out into separate functions a pain in the head.
by eru 18y ago
When I last tinkered with PHP they did not have lexical scoping. That makes refactoring stuff out into separate functions a pain in the head.
- randallsquared 18y agoI dunno about 10 years ago, but for a long time now, you could just use a class to avoid globals and still keep some handy variables around. It's slightly painful (I came from Python, and I still end up typing $objectname.methodname() and then going back and putting in '->'), but not nearly so much as I used to think before I had to work with PHP every day. :)
- neilk 18y agoThey still don't. And, as I pointed out above, we don't even use classes. This might seem crazy, but this project was started before PHP had actually decent objects, and now all the special workarounds have become part of the house style. So I'm living in a world of pure procedural programming right now. It's the 70s again.