We help IT Professionals succeed at work.

PHP 5.6 and 7.x

197 Views
Last Modified: 2017-03-17
Hi Experts,

Can I run PHP 5.6 and 7.x for the same website on IIS 8.  

I have a lot of legacy code which I want to keep but my all new development I want to utilize PHP 7.x

Is this possible in a production environment

Thanks

Chris
Comment
Watch Question

CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Technical Lead - Active Directory
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Most Valuable Expert 2011
Author of the Year 2014

Commented:
in a production environment
Not to be flip, but if you have to ask the question, the answer is "no!"  Depending on your level of PHP and your diligence with security, modernity, etc., there may be breaking changes in PHP7, so you want to take some careful steps to accomplish the upgrade.

First, know why you want to upgrade.  Set measurable goals so you can see the advantages you want to get from the upgrade, and measure your progress against these goals.

Second, be certain that you have (as near as possible) complete code coverage in your tests, and a sturdy test data set that you can exercise quickly and easily.

Third, read the migration guides. http://php.net/manual/en/migration70.php  Then read them again.

I agree with skullnobrains on this (I usually do): You might want to consider using a different file suffix for the PHP7 code.  I recall using .php and .php5 when PHP5 was introduced.  It helped keep everything well-segregated, and allowed us to make piecemeal changes in the 400+ scripts that required upgrades.  I don't really know much about Windows, but in a Linux environment you can use .htaccess to control PHP versions and settings on a directory-by-directory basis -- very handy!

Author

Commented:
Thanks Guys.  It looks like updating from 5.6 to 7 is relatively straightforward  and maybe this is the best way to go....
Thanks for you help...

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions