Anna Filina explains the handy
platform option you can use in
composer.json. It's a good idea to just use this in all of your projects.
Say you run the latest PHP version on your machine, but the server runs PHP 5.5. This means that when you decide to add a Composer package, it might propose a version that may not be installable on the server. The solution is surprisingly easy. You can instruct Composer to see the PHP version of your choosing.