This guide will walk you through the various issues you might encounter when attempting to upgrade PHP to the latest version. Each problem has an explanation with examples, as well as a generic solution that you should be able to apply regardless of context.
This guide is a work in progress. There are hundreds of potential compatibility issues, and each requires careful investigation.
Written by Anna Filina.
Special thanks to the authors of the PHP Compatibility, and the PHP Documentation Team.
Each codebase is unique, and I cannot guarantee that my solutions will work in every possible case. Use your judgement, and please share your findings so that I could refine the solutions.