> PHP likes to pretend it's a dynamic language (Closures, for instance),
PHP is a dynamic(ally typed) language, and closures have nothing to do with static/dynamic.
> at its core it's a very strange dynamic/static hybrid
No, at its core it's completely dynamically typed, it got static features when it decided to base its OO on Java's.
> Which is why this doesn't work:
This doesn't work because PHP uses a shitty ad-hoc parser for a shitty ad-hoc syntax, much like closures it's completely orthogonal to the language being dynamic or static.
Also, this piece of code doesn't involve any closure. It looks like you don't know what a closure is.
PHP is a dynamic(ally typed) language, and closures have nothing to do with static/dynamic.
> at its core it's a very strange dynamic/static hybrid
No, at its core it's completely dynamically typed, it got static features when it decided to base its OO on Java's.
> Which is why this doesn't work:
This doesn't work because PHP uses a shitty ad-hoc parser for a shitty ad-hoc syntax, much like closures it's completely orthogonal to the language being dynamic or static.
Also, this piece of code doesn't involve any closure. It looks like you don't know what a closure is.