by stevencorona · 14y ago · 0 comments
PHP OO is screwed up and hacked together. Look at crappy support for late static binding, being unable to bind $this in closures, and all of the hack-glue that is get_class(), get_class($this), get_called_class(), self:: vs static::, the list goes on.
The thing is that, with PHP, the "new, modern" features are only surface deep... once you do anything slightly advanced, you can always tell that they were hacked on to a language that was never meant for anything more than 'include counter.php', and maybe that's okay, but stop saying it's a real programming language because it's NOT.
Any definition of "real programming language" that can inexplicably exclude the Facebook stack is just meaningless. Saying that another stack could do it better is pointless since PHP is what does it. And just to preempt any "HipHop is the stack, not PHP", just remember that front-end Facebook engineers don't write C++, they build Facebook in PHP, inconsistent parameter orders and all.
What is crappy about the late static binging support for example?
Btw, you can bind and rebind $this as of PHP 5.4.