I need to upgrade from 5.2. to 5.6 . Is there a quick way to check my (zillion) scripts to make sure I don't have any problems when they run under 5.6? I am still using DzSoft PHP editor and I am not sure if I simply need to install 5.6 for DzSoft to check my code.

All help is very much appreciated.

    I can't think of a quick way to check that doesn't involve having unit testing in place to begin with.

    The four pages in [man]migration53[/man], [man]migration54[/man], [man]migration55[/man], and [man]migration56[/man] that deal with backward-incompatible changes list that things that could break when going from 5.2 to 5.6. Those at least give you things like function names that you can do a search for to see if how you're using them is still valid (a while back I had to search through my code base to find places where I'd used preg_replace's /e modifier), but there are some that can't be found that way (such as functions expecting call-by-reference arguments being given literal values instead).

    And with PHP 5 having recently entered into its "security fix only" phase, you can start thinking of the fun you'll have of upgrading to PHP 7 and more extensive list of incompatibilities.

      Sounds like a job for a robust unit test suite and a VM or Docker image where you can try it out. 🙂

      I'm not familiar with DzSoft, but it likely uses the "php -l" option to "lint" check the source code, so you could conceivably install a separate instance of PHP 5.6 and point the editor to that executable, assuming its config has a way to do that?

        +1 for VM's. Set one up like the prod server and put your stuff there first, and parse error_log like there's no tomorrow. And tell the boss he needs more people assigned to QA, and you'll gladly supervise them for a 10% raise ... 😉

          The problem is I am the head, cook and bottle washer - so, there is no 10% raise insight. She, who must be obeyed, will see to that.

          OK, all joking aside, I have a Virtual Server setup and I have 7 months to do my testing. But, I did receive some very good advice here and I thank everybody for that.

          I won't mark the thread as complete as yet, just in case there is somebody out there who has more ideas.

            Weedpacket;11060815 wrote:

            And with PHP 5 having recently entered into its "security fix only" phase, you can start thinking of the fun you'll have of upgrading to PHP 7 and more extensive list of incompatibilities.

            I upgraded 5 projects from 5.6 to 7.0 without changing any code, by not relying on any deprecated features. So as long as you can run with full error_reporting and no errors, it should be easy.

              Well, I had a problem this morning with 2 of my sites. Turned out, I had sent 5,000 emails (whilst I was still asleep) and about 100,000 emails where queued up. That is what sparked the entire process.

              I will check with Godaddy, to see about PHP7.0 a bit later.

                Write a Reply...