3 ms·
> Everyone knows that any script that works in PHP 5.6 will probably work just fine in 7.0 This is no longer strictly true. On Friday, the "let's remove all t
by McGlockenshire 12y ago
> Everyone knows that any script that works in PHP 5.6 will probably work just fine in 7.0
This is no longer strictly true. On Friday, the "let's remove all the deprecated stuff" RFC was passed. Anything that causes an E_DEPRECATED in 5.6 will now be a fatal in 7. For example, ext/ereg and ext/mysql are no longer included, and have been shipped off to PECL. Shouldn't be a problem for anyone that doesn't compile their own, really. A few php.ini settings are also now removed, which will fatal on startup.
It'll be safe to say that if your code runs fine under 5.6 with error_reporting set to -1, then you'll probably run under 7 without too much trouble.
- kijin 12y agoYou're right, any code that runs without errors in 5.6 will probably run fine in 7.0. And that's exactly how deprecation is supposed to work! No massive changes, only incremental changes, and even those incremental changes come with at least a couple of years of grace period.
- ars 12y ago> It'll be safe to say that if your code runs fine under 5.6 with error_reporting set to -1, then you'll probably run under 7 without too much trouble. Not completely, ext/mysql does not output E_DEPRECATED. Although I guess installing a compatibility library is probably not all that much trouble.
- McGlockenshire 12y agoCalling mysql_connect will cause an E_DEPRECATED. Same with mysql_pconnect. Source: the manual page. http://php.net/mysql_connect http://php.net/mysql_connect None of the other ext/mysql functions do so.