简体   繁体   English

将网站迁移到更高版本的PHP

[英]Migrating website to higher version of PHP

I have a website hosted on a VPS server using PHP version 5.6.40. 我有一个使用PHP 5.6.40版在VPS服务器上托管的网站。 I would like to upgrade PHP version to 7.0.33. 我想将PHP版本升级到7.0.33。 Is there a way to run some sort of audit to determine if anything would break as a result of migration? 有没有一种方法可以进行某种审计以确定是否由于迁移而导致任何破坏?

The best way to determine this is to have a full suite of tests for the application in question. 确定此问题的最佳方法是针对相关应用程序进行全套测试。 You can then run it on the new version. 然后,您可以在新版本上运行它。

Failing that, I have used PHP Compatibility before, which is a series of sniffs for PHP Codesniffer, and will at least tell you if the syntax is incompatible with the specified version of PHP. 失败的是,我之前使用过PHP兼容性 ,这是PHP Codesniffer的一系列嗅探,并且至少会告诉您该语法是否与指定的PHP版本不兼容。 It won't guarantee it will work as expected with that version, but will catch syntax problems, which you can then resolve manually. 它不能保证它将在该版本上正常运行,但是会捕获语法问题,然后可以手动解决。

It still doesn't offer a cast iron guarantee that it'll catch everything, but if the application is small then coupling it with manual testing may be sufficient. 它仍然不能提供铸铁保证可以捕获所有内容,但是如果应用程序很小,那么将其与手动测试结合起来就足够了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM