Migrating from PHP 5.6.x to PHP 7.0.x

Table of Contents

PHP 7 is under development

Warning

PHP 7.0 is still under development and while it is unlikely to happen, the features and changes noted in this section are subject to change before the final 7.0.0 release. Please double check this migration guide before deploying a stable 7.0 release to production.

Despite the fact that PHP 7.0 is a new major version, efforts were put in to make migration as painless as possible. This release focusses mainly on removing functionality deprecated in previous versions and improving language consistency.

There are a few incompatibilities and new features that should be considered, and code should be tested before switching PHP versions in production environments.

See also the migration guides for PHP versions 5.0.x, 5.1.x, 5.2.x, 5.3.x, 5.4.x, 5.5.x and 5.6.x.

add a note add a note

User Contributed Notes 1 note

up
-83
bhagwan parge
2 months ago
When a new version comes then it becomes a very tedious task to migrate.

I have recently used following ubuntu shell script (or you can create a similar one for windows) to check syntax errors in all of the codebase.

#!/bin/bash
cd /home/bhagvan/restapi
for FILE in `find . -name "*.php"`
do
  php -l $FILE;
done
To Top