Link to home
Start Free TrialLog in
Avatar of chrislindsay
chrislindsayFlag for United Kingdom of Great Britain and Northern Ireland

asked on

PHP 5.6 and 7.x

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
SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!
Avatar of chrislindsay

ASKER

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...