Hacker News new | ask | show | jobs
by McGlockenshire 4171 days 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.

2 comments

You'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.

> 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.

Calling mysql_connect will cause an E_DEPRECATED. Same with mysql_pconnect.

Source: the manual page. http://php.net/mysql_connect

None of the other ext/mysql functions do so.