3 ms·
Hack has incompatibilities with some current PHP code too. Particularly the different syntax for generators (PHP 5.5) and the upcoming syntax for variadic funct
by Gigablah 12y ago
Hack has incompatibilities with some current PHP code too. Particularly the different syntax for generators (PHP 5.5) and the upcoming syntax for variadic functions (PHP 5.6).
- jwatzman 12y agoCan you elaborate on these incompatibilities, particularly generators? I work on the project and the only generator incompatibility I know of is that what PHP5 calls "Generator" we call "Continuation", but only since we haven't gotten around to renaming ours yet :) I'm also pretty sure HHVM supports 5.6 variadic functions in PHP code, or will very soon; the Hack typechecker currently does not, but that is strictly a missing feature, and something we do want to support.
- Gigablah 12y agoThere's already open issues in GitHub regarding the differences in generator syntax -- I commented in one: https://github.com/facebook/hhvm/issues/1787 https://github.com/facebook/hhvm/issues/1787 I guess the class has been renamed in trunk, but according to this, the syntax differences still remain: https://github.com/facebook/hhvm/issues/1871 https://github.com/facebook/hhvm/issues/1871 And while we're at it, might as well point out the missing Closure::bind and Closure::bindTo from PHP 5.4: https://github.com/facebook/hhvm/issues/1203 https://github.com/facebook/hhvm/issues/1203