I have a website on a server with php 4.4. (Yes, it exists)
I must move it on an other hosting with php 7 I've tried in local, and it's full of errors and nothing works.
For "scan" the files, I want make a script to find the old function and, after, one by one, "repair". Most of .php are "dirty scripts", not well organised but my job is only to move this website and adapt it to php7.
But, I need to find the list of deprecated or incompatible functions from Php 4.4 to Php 7.
Where can I find such a list???
UPDATE:
I've find most of the problems in the main files (most problems are ereg function and mysql -> mysqli). In the same time, I simplified the scripts because the developer used the same function with different name many times (8 times in the same file, with 8 different names -_-) So I've made a function.php where I put all functions and I include it in the files.
It's not easy to work after a dirty developer -_-
The salt option for the password_hash() function has been deprecated so that the developers do not generate their own (usually insecure) salts. The function itself generates a cryptographically secure salt, when no salt is provided by the developer - thus custom salt generation is not required any more.
As a constantly developing language, newer PHP versions include functions that become deprecated. These functions cease to exist or change the expected result of the function as further versions of PHP are released.
PHP 7 is not backwards compatible.
You need to be aware that for the most part, PHP 5. x code can run on PHP 7. In PHP 7, there are some backwards incompatible changes, so applications built with PHP 5.
Update: A comment brings up a good point. If you upgrade fully to non-deprecated 5.6 (get rid of any errors and code causing deprecated warnings) you should be able to run under 7 with most likely just Deprecation notices (which you can disable)
First, take a deep breath and figure why you need to upgrade from 4.4 to 7. I can see the immediate value of getting up to a nice still supported 5.6, but 7 is a bit agressive in one sitting (maybe). However, if you'd spartan enough for the challenge....
Got to the release history page and read each release from version 4.4 to whatever version you have available that you're looking to run:
http://php.net/releases/
Each version you care about should have a changlog
link. Click on it, search for 'deprecated`.
There are actually only 2 files one changelog for php4 version and one for php 5 version.
Heck, if you get ambitious just write a crawler script in php to pull the pages and parse out the deprecated lines.
Once you're through correcting all the php 4 to 5.6 differences, take a look at migrating to php 7 (see my note at the top about running with deprecation notices):
http://php.net/manual/en/migration70.incompatible.php
Though some see it as a negative, PHP has been painfuly rigorous at maintaining quite a lot of backward compatibility, so I don't expect much to be off if you're moving to PHP 5.3 or even 5.4 (around when they started deprecating a bunch of older php stuff).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With