If you want to test your Zend Framework 2(ZF2) or any PHP application with PHP7 we have a good news for you! We have prepared new isolated development environment based on our previous box.
At the moment PHP7 is still in heavy development and the installation and updates in your existing operating system can be challenging. Therefore we have prepared for you a script that can help you create an isolated development environment with PHP7 and the sample application from “Learn ZF2” in it for your testing pleasure. Of course you can add your own PHP applications to the box and test if they are working with PHP7.
Here are the steps that you need to create your own dev box with PHP7.
Then you need to clone the learnzf2-box repository using the following command:
git clone -b php7 https://github.com/slaff/learnzf2-box.git learnzf2-box-php7
And when the repository is cloned you have to start the virtual machine using
cd learnzf2-box-php7 vagrant up
After some minutes you will have brand new isolated development environment with Ubuntu 14, apache web server with PHP7 and the latest version of the “Learn ZF2” source code from github.
In order to ssh to the virtual machine you can type
And in order to access the web server from outside you can type in your browser http://localhost:8080
The source code is in a shared folder named dev and can be accessed and modified both from inside the virtual machine and from your physical machine.