Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacklib fatal error on PHP 7.1: 'Iterable' is a reserved word #7660

Closed
doublecompile opened this issue Feb 10, 2017 · 2 comments
Closed

Hacklib fatal error on PHP 7.1: 'Iterable' is a reserved word #7660

doublecompile opened this issue Feb 10, 2017 · 2 comments

Comments

@doublecompile
Copy link
Contributor

The PHP code that h2tp outputs cannot be used on PHP 7.1 because iterable is now a reserved word.

This is done on an Ubuntu 16.04 machine that has:

  • HHVM 3.17.2 (using the dl.hhvm.com/OSL deb repo)
  • PHP 7.1 (using the PPA from Ondřej Surý)
$ php7.1 -a
Interactive mode enabled

php > require_once '/usr/share/hhvm/hack/hacklib/hacklib.php';
PHP Fatal error:  Cannot use 'Iterable' as class name as it is reserved in /usr/share/hhvm/hack/hacklib/containers/interfaces.php on line 97
PHP Stack trace:
PHP   1. {main}() php shell code:0
PHP   2. {main}() php shell code:0
@doublecompile
Copy link
Contributor Author

As a side note, the PHP 7.1 iterable type hint now essentially duplicates what HH\Traversable does.

@mofarrell
Copy link
Contributor

h2tp was removed from the repo. This is something you can work on by forking h2tp and making modifications there.

Others in the community are interested in creating a similar transpiler using the new full fidelity parser. You can read more about what they are thinking here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants