Set hhvm to php 7 mode, the behavior is compatible with php 7 but not always with php 7.1
We currently have a broken php 7 mode ini option (see #7198), but no php 7.1 mode ini option
Is there a reason we shouldn't just update PHP 7 mode to match 7.1? I'd rather not add a new mode for every version of 7, it's hard enough supporting 5, 7, hack, and various combinations thereof.
php 7 is supported until 3 Dec 2018
php 7.1 is expected to be released in January 2017 and supported until 1 Dec 2019
Backward incompatible changes http://php.net/manual/en/migration71.incompatible.php
changed functions http://php.net/manual/en/migration71.changed-functions.php
I'm not sure if I have an opinion on why "we shouldn't just update PHP 7 mode to match 7.1", Especially if it's documented what behavior we should expect from HHVM.
On the other hand, we kind of have a framework in place on how to version the php 7 mode
consider the tag hhvm.php7.all which "fully enables PHP 7 mode" this could be considered "fully enable the most recent PHP 7.x mode" then add other php 7.x compatibility items as follows
SETTING | TYPE | DEFAULT | DESCRIPTION | PHP 7.x RFC
------------ | ------------- | ------------ | ------------- | ------------
hhvm.php7.date_time | bool | hhvm.php7.all | |
hhvm.php7.date_interval | bool | hhvm.php7.all | |
hhvm.php7.unserialize_notices | bool | hhvm.php7.all | |
hhvm.php7.casting | bool | hhvm.php7.all | |
hhvm.php7.var_dump | bool | hhvm.php7.all | |
hhvm.php7.json_pretty_print | bool | hhvm.php7.all | |
Another thing to consider here is that PHP 5.6 active support ends in 16 days.
IMO, in light of this, it would be perfectly understandable if HHVM dropped PHP 5 support altogether in the next release. At least then you'd only have 7.0 and 7.1 differences to worry about.
@ezzatron because Security Support for PHP 5.6 will continue until 31 Dec 2018 (about the same point that php 7 Security Support ends) most developers and frameworks are more likely to support php 5.6 than php 7. I think dropping php 5 support from HHVM now would be the wrong choice and would likely reduce HHVM adoption.
Fair call, I just thought that perhaps if you want PHP 5 support, you use an older version of HHVM. But I can understand the logic for keeping it in too.
@ezzatron just look at number of php5 incompatibility tags about 246 issues... to see why even the current HHVM doesn't yet fully support PHP 5 code. It's hard to convice projects to use HHVM when there are issues blocking use and adoption.
@mxw please include this in the upcoming meeting on php7
Thanks for the notification @fredemmott I'll close my other issues for the same reason.
To clarify, it鈥檚 not that we鈥檙e not going to fix any PHP7 issues - but we no longer have a goal of fixing all of them, or targeting any specific version of PHP. This issue seems to be asking for the latter.
I read it as HHVM is moving towards only supporting Hack. All of my reported issues were related to trying to run PHP code, as such I closed them. Feel free to reopen them if they are of interest. Unfortunately, all of my reported HHVM issues seemed dead in the water with no activity for over a year.
Most helpful comment
@ezzatron just look at number of php5 incompatibility tags about 246 issues... to see why even the current HHVM doesn't yet fully support PHP 5 code. It's hard to convice projects to use HHVM when there are issues blocking use and adoption.