3 ms·
Are there any large Hack codebases I can explore? I am interested to see how different from straight PHP it is. Does anyone know if FB tracks changes to PHP s
by ThinkBeat 5y ago
Are there any large Hack codebases I can explore?
I am interested to see how different from straight PHP it is.
Does anyone know if FB tracks changes to PHP so Hack is
"up to date"?
- np_tedious 5y agoHack features have actually driven a lot of the additions into recent PHP versions. So the more relevant question might be the other way around
- TrispusAttucks 5y agoNot quite an answer to your question but slack engineering wrote a paper [1] on migrating their code base from PHP proper to Hack. Specifically they used [2] 'partial mode' since "this loosens several restrictions to ease migration" [1] https://slack.engineering/hacklang-at-slack-a-better-php/ https://slack.engineering/hacklang-at-slack-a-better-php/ [2] https://docs.hhvm.com/hack/source-code-fundamentals/program-structure#legacy-files https://docs.hhvm.com/hack/source-code-fundamentals/program-... EDIT: This would indicate that Hack may perhaps support standard PHP syntax but not the other way around. EDIT: According to this [3] they are very compatible. [3] https://www.oreilly.com/library/view/hack-and-hhvm/9781491920862/preface01.html https://www.oreilly.com/library/view/hack-and-hhvm/978149192...
- jbboehr 5y agoThey stopped supporting interoperability a while ago [0]. [0]: https://hhvm.com/blog/2018/09/12/end-of-php-support-future-of-hack.html https://hhvm.com/blog/2018/09/12/end-of-php-support-future-o...
- fredemmott 5y ago> Are there any large Hack codebases I can explore? depends what you mean by 'large' - perhaps https://github.com/hhvm/user-documentation https://github.com/hhvm/user-documentation ? > Does anyone know if FB tracks changes to PHP so Hack is "up to date"? No, for the most part, Hack no longer considers PHP 'upstream'. Exceptions are things like security fixes to extension functions, if that particular extension function was derived from PHP.