Symfony 2.5, which I’m planning to install, requires PHP Version 5.4 or higher. I checked my web server where the site will ultimately be deployed. It’s using PHP 5.4.35. MAMP is using PHP 5.4.30 on my localhost. And my computer terminal app gives me PHP 5.5.14 so I should be good.
I found the web server PHP version in my control panel – I’m using cpanel.
You could use
phpinfo(); in one of your webpages to show you the version if you can’t find it in your control panel or from your host.
To find the PHP version on MAMP, just click on the PHP tab. You should have a couple of versions to choose from.
I tried to choose the closest version to my hosting web server so that I won’t have any surprises when I deploy the live site.
Finally, to find out the version on my Mac, I opened a terminal (command line) window and typed
You can find the terminal window in Applications/Utilities on your Mac. Windows users will need to open your command prompt window.
Check the symfony website to find out what version of PHP you will need for the symfony version you are installing. This page says PHP 5.3 while the tutorial says PHP 5.4. Usually higher is better, so I’m going with PHP 5.4. All three of my environments are above that so it looks like I’m good!