I'm sorry but it's hard to really take someone seriously when they start out by comparing a language (PHP) against a framework (Rails), and then make this claim:
> Metaprogramming and reflection have to be implemented by the framework as they’re not part of the language.
Every example there seems to relate to a framework called "Flow", and the author sums this up quite succinctly:
> It took them five years to experiment and find something that works for them
The key words are the last three. WORKS. FOR. THEM. I've never heard of Flow before, and from what I've seen in this blog alone, it looks like more PHP developers who want to be Java developers.
I agree completely that the examples shown are fucking horrific, but thats not a fault of the language.
Let's take the "Fetch a record" example. It's perfectly possible to have a php model that works like so:
BlogPost::findByPK($foo);
As for the templates, yes the Flow templates are fucking stupid. That's still not a fault against PHP - I've given up trying to understand why people feel the need in PHP - which is itself an excellent templating language - to create new, more complex and yet limited template languages.
> Metaprogramming and reflection have to be implemented by the framework as they’re not part of the language.
Every example there seems to relate to a framework called "Flow", and the author sums this up quite succinctly:
> It took them five years to experiment and find something that works for them
The key words are the last three. WORKS. FOR. THEM. I've never heard of Flow before, and from what I've seen in this blog alone, it looks like more PHP developers who want to be Java developers.
I agree completely that the examples shown are fucking horrific, but thats not a fault of the language.
Let's take the "Fetch a record" example. It's perfectly possible to have a php model that works like so:
As for the templates, yes the Flow templates are fucking stupid. That's still not a fault against PHP - I've given up trying to understand why people feel the need in PHP - which is itself an excellent templating language - to create new, more complex and yet limited template languages.