Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
How to Use PHPbrew and VirtPHP
Oct 06, 2014 @ 18:08:41

Phil Sturgeon has written up a new tutorial for the SitePoint PHP blog showing you how to use PHPbrew and VirtPHP to be able to work with more than one PHP version on the same system.

We’ve all been in the situation where we have one version installed. Maybe that version is whatever came installed on our operating system. Maybe it is a version bundled into MAMP/WAMP/XAMPP. How do you go about switching that PHP version? How do you switch to one version, then switch back again? How do you go about switching that version of PHP, but only for one single application on your computer? The Ruby and Python communities have had tools for dealing with this for years. PHP has them now too, but there was nowhere near enough fanfare.

He starts with PHPbrew and walks you through a basic install and configuration of a version of PHP 5.6.0. He shows how to add extension support and switch between the different PHP versions at will. Next comes the look at VirtPHP, a similar system that takes a little bit different approach. It creates "environments" that contain the PHP version to a bit more isolated setup. With an environment created, VirtPHP lets you install PECL extensions without changing anything globally. He ends the post with a comparison to how most developers (developing locally) handle their setup and mentions Vagrant, but notes that it may be a bit much for the solo developer.

tagged: virtphp phpbrew tutorial multiple version install configure

Link: http://www.sitepoint.com/use-phpbrew-virtphp/


Trending Topics: