PHP 7 Support
For those that haven’t been following along, the next version of the PHP language, version 7.0.0, was very recently released. Those of us working on HHVM offer our congratulations to all the contributors to this latest release! We’re all really excited to see this release come out the door, and for what it means for the future of PHP.
The release has implications for HHVM as well. PHP 7 contains many new and exciting language features, such as anonymous classes and generator delegation. The HHVM project is committed to continuing to support the evolving PHP language, and as such we are proud to announce that the current nightly releases have support for all major PHP 7 features, and the upcoming 3.11.0 stable release will be the first release of HHVM with support for the major PHP 7 features.
A small number of the changes in PHP 7 are not backwards compatible, and we don’t want to leave behind our many users relying on our solid PHP 5 support and who may, for good reason, not want to upgrade immediately. Therefore, HHVM will continue to simultaneously support PHP 5 and PHP 7 for the foreseeable future. This is the way the simultaneous support works:
Features that pose no compatibility issues are just always available. For example, anonymous classes require no special configuration to use — they work by default.
Similarly, features which were removed in PHP 7, such as alternative open tags, will just continue to work in HHVM for the foreseeable future.
The INI option
hhvm.php7.all = 1enables the PHP 7 behavior for backwards-incompatible changes. (PHP 5 behavior will remain the default still for a while.) Each major compatibility break has its own option, if you want to turn them on one by one. See our INI documentation for details.
The language features of PHP 7.0 are of course just the start. As PHP 7.1 and onward develop, we will keep adding the new PHP features into HHVM, to continue having parity with the language.
Please give the nightly builds a try and let us know about any issues so we can fix them before the 3.11.0 release! All the major features are working and pass PHP 7’s own test suites, but there are certain to be edge cases and minor features we’re missing. We want to make sure that 3.11.0 is as solid a release as possible for our new PHP 7 support!
- milliondollarserver: This is exciting! Looking forward to see how nightly works.
- najbolji hosting: nice, php 7 is amazing
- Danny van Kooten: Neat, still happily running HHVM with no intention to switch to PHP7 anytime soon. To hear that you'll be supporting all PHP7 features is reassuring! :)
- PHP7 atau HHVM ? | KMKLabs Blog: […] Josh Watzman dari Facebook ada mengeluarkan blog post bahawa release HHVM 3.11 akan dimundurkan untuk memastikan semua fitur baru yang ada di PHP7 […]
- Orhaan: Well done we're very excited about that :)
- Elian: i have a question guys is there any compatibility problems with the php 7 versions? i have applications running the 5.5 and if i start working on the 7 might be any issues on files i add on ?
- Joel Marcey: Elian, what type of compatibility problems are you referring to? With HHVM's PHP 7 support, you currently have to opt-in for any of the breaking changes that might occur. So, if you use new features, you can use those without opting in and we attempted to be as compatible with PHP 7 as possible. Are you running into anything in particular?