6 ms·
coming from a lisp background, and now working on a 'mid-sized' php CMS, i've been pretty happy with the reflection and other features (dunno if they are 5.3 or
by larve 15y ago
coming from a lisp background, and now working on a 'mid-sized' php CMS, i've been pretty happy with the reflection and other features (dunno if they are 5.3 or not) like closures to build something which has around methods, reflectioning on the docstrings to generate a REST api, etc...
good fun indeed, you still have to be aware of a lot of php quirks though to make your code secure.
- troels 15y agoClosures are new in 5.4, but the reflection api has been there since 5. Indeed, PHP may not be pretty, but it's really good at hacking stuff together that just works. A lot like shell scripting, although much more maintainable. My biggest beef with PHP is that there is such a chasm between the procedural style at the object oriented one. This is mostly caused by PHP adopting a static class model (a really odd choice for an otherwise highly dynamic language). On the plus side, this tends to cause fewer surprises than you see in languages with a more dynamic object model.