I should admit it. After writing more and more Ruby code and get into its beautiful Object Model it feels rather strange to go back to PHP.
What I miss mostly is the syntactic sugar and the less verbose syntax.
You don’t have to put dollar signs before variables names, semicolons at the end of statements and most of the times you can also omit method parentheses (i.e. when there are no ambiguities).
But beware! Omitted parentheses could lead to unexpected behaviors and bugs that could be hard to find! So you’d better indulge on this sugar only if you know what you’re doing.
Continue reading “A little bit of metaprogramming with PHP” →