Amazone
Amazone

Reputation: 436

List of deprecated functions between php4.4 -> php7

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

Upvotes: 7

Views: 10016

Answers (2)

Online Sid
Online Sid

Reputation: 116

I find this list is better structured: Migrating from PHP x to PHP y

My team and I are migrating from 5.6 to 7.2 so I read in the following order to see what have been deprecated:

Upvotes: 0

Ray
Ray

Reputation: 41448

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

Upvotes: 8

Related Questions