Code As Data: Reflection in PHP
There is a long history of using programs to automate the writing of code in C and similar languages (including Lex, yacc, lint, ctags, and others). For C programmers, many of these tools have been around in one form or another since the 1970s, and are very well understood by the community. However, for people who learned to code in PHP, Perl, and Python (the “P” languages), the use of tools like this may never have entered their horizon. This is unfortunate, because a solid tool chain for code generation and parsing can lead to better end code and higher programmer efficiency, as I will show here.
Once we establish that we can parse our code with a tool, then two questions remain: […]
It doesn’t let up either. The entire article is one comical tragedy, though much of it supplied by PHP itself rather than the author.
Sorry, PHP programmers, there are only three “P” languages, and one of them starts with an “R”.