Home » Php » php – Cakephp with PHP7

php – Cakephp with PHP7

Posted by: admin July 12, 2020 Leave a comment


Can I run CakePHP 1.3 with PHP7? I have to do a migration to PHP7, but in the hosting there is a project in CakePHP 1.3 and need to know if there is any risk if I run this project in this version of PHP.

How to&Answers:

Unfortunately CakePHP 1.3 is not really compatible with PHP7 out of the box. I work on a old project in CakePHP 1.3 and my system upgraded to PHP7. There are a lot of these in the core of CakePHP 1.3

After changing these, I ran into the next batch of errors, after which I rolled back and postponed the upgrade.

So to answer the question, it would be rather risky upgrading to PHP7 if there is a CakePHP 1.3 project.


If you are still looking for a CakePHP 1.3 port to PHP7, you are in luck!

I’ve ported CakePHP 1.3.21 to PHP 7.3, you can check it out on GitHub.

Please pay attention to the readme, as it naturally requires changes to your own code as well!


I had to migrate a CakePHP 1.3 project to PHP7 and the only thing I did was find the “String” class and using PhpStorm’s rename all occurrences feature I renamed it to “String_Renamed” that fixed the errors and everything worked afterwards. I’ve had no issues since.