Re:Plus – A superset of PHP that makes PHP cool again
by krapp on Friday September 13, 2019 @07:33PM
(#20967753)
>some of its other, stranger features (like XHP) are unlikely to ever be adopted upstream
XHP fixed one of the worst problems that PHP had, being a language intended to generate HTML that didn't recognize XML as a type, and so had no way to validate or contextually escape what it sent.
Sure, you can just use a templating framework like Twig to do it in PHP, or compile XHP into it, but you shouldn't have to.
Hack started out as a superset of PHP, but it has diverged from the original language. Some of the features it was created to add (like type annotations and lambda functions) have since been added upstream, sometimes with different syntax; some of its other, stranger features (like XHP) are unlikely to ever be adopted upstream. At this point, it's best described as an incompatible fork.