php4.4之间不推荐使用的功能列表-> php7 [英] List of deprecated functions between php4.4 -> php7

查看:113
本文介绍了php4.4之间不推荐使用的功能列表-> php7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用PHP 4.4的服务器上有一个网站. (是的,它存在)

I have a website on a server with php 4.4. (Yes, it exists)

我必须使用php 7将其移至其他主机上 我在本地尝试过,到处都是错误,没有任何效果.

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.

对于扫描"文件,我想制作一个脚本以查找旧功能,然后逐个修复". 大部分.php是肮脏的脚本",没有很好的组织,但是我的工作只是移动该网站并将其改编为php7.

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.

但是,我需要找到从Php 4.4到Php 7弃用或不兼容的函数的列表.

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

更新:

我在主文件中找到了大多数问题(大多数问题是ereg函数和mysql-> mysqli). 同时,我简化了脚本,因为开发人员多次使用相同的函数使用不同的名称(在同一文件中使用8次,使用8个不同的名称-_-). 因此,我制作了一个function.php文件,在其中放置了所有函数,并将其包含在文件中.

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

推荐答案

更新:提出了一个意见.如果您完全升级到 不推荐使用5.6(消除导致不推荐使用的任何错误和代码 警告),您应该能够在7岁以下运行, 弃用通知(可以禁用)

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)

首先,深吸一口气,弄清楚为什么需要从4.4升级到7.我可以看到立即获得一个仍然受支持的5.6的直接价值,但是一次坐7(也许)有点令人反感.但是,如果您足够勇敢应对挑战......

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

转到发布历史记录页面,并从4.4版读取每个发行版,再到要运行的任何可用版本:

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/

您关心的每个版本都应该有一个changlog链接.单击它,搜索已弃用".

Each version you care about should have a changlog link. Click on it, search for 'deprecated`.

实际上只有2个文件,一个php4版本的变更日志和一个php 5版本的变更日志.

There are actually only 2 files one changelog for php4 version and one for php 5 version.

  • http://php.net/ChangeLog-4.php
  • http://php.net/ChangeLog-5.php

哎呀,如果您有雄心壮志,只需在php中编写一个爬虫脚本以拉出页面并解析不赞成使用的行即可.

Heck, if you get ambitious just write a crawler script in php to pull the pages and parse out the deprecated lines.

一旦您将所有的php 4改正为5.6,请看一下迁移到php 7(请参阅我的顶部有关弃用通知的说明):

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

尽管有些人认为它是负面的,但是PHP在保持相当多的向后兼容性方面一直非常严格,因此,如果您要使用PHP 5.3甚至5.4(在他们使用PHP左右时),我预计不会有太大的损失开始弃用一堆旧的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).

这篇关于php4.4之间不推荐使用的功能列表-> php7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆