用于检测脚本的 PHP 版本的本地或基于服务器的爬网程序

发布于 2024-09-15 01:30:07 字数 115 浏览 1 评论 0原文

我有一些自定义脚本是在 php4 和 php5 的更改附近编写的,我希望轻松找到所有 php4 版本,以便我可以重写它们,以便它们可以与 php5.3 一起使用。有没有可以在我的本地计算机或服务器上执行此操作的工具?

I have custom scripts that are were written near the change of php4 and php5 and I am looking to find all of the php4 versions easily so that I can rewrite them so that they work with php5.3. Is there a tool that can perform this on my local machine or the server?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帅的被狗咬 2024-09-22 01:30:07

我认为在 php5 中几乎不可能清楚地检测哪个脚本会抛出错误。问题可能非常小,并且可以动态显示(例如解析为函数参数的错误数据类型)。

在你的位置,我会编写简单的目录树“traveller”并扫描 .php 文件以查找已弃用的函数等(例如 is_a -> instanceOf 更改)。

您可以在这里找到一些帮助来执行一些工具:
http://www.php.net/manual/en/migration5.incomplete。 php

当然,还要搜索 .php4 文件并查看这个文件。

I think that it's almost impossible to detect clearly which script will throw errors in php5. Problem can by very small, and it can show up dynamically (like bad data type parsed as argument to function).

In your place, i would write simple directory tree "traveller" and scan .php files for deprecated function etc. (like is_a -> instanceOf change).

You can found some help here, to do some tool:
http://www.php.net/manual/en/migration5.incompatible.php

of course, also search for .php4 files and take a look for this ones.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文