Force Composer.phar/SSH to use php56 instead of php at command line
<p>I am setting up Laravel 5.2. My host supports php 5.4 by default. Other PHP versions are available through Cpanel but not through SSH by default. I can use other PHP versions by prefixing my commands with php5.6, php7, etc. So when I use the prefix "php composer.phar" the command is executed using the default php 5.4. I have had a hard time installing Laravel 5.2 but I have successfully installed it through php56 prefix. By running the prior commands manually at the point of failure.</p>

<p>Most of the installation commands through composer have to execute other commands at some point through the installation but never use php56. Other commands are always executed with a php prefix. For example if I run the command;</p>

<pre><code>php56 composer.phar require prettus/l5-repository
</code></pre>

<p>Another command will have to be run at some point. For example this command runs at some point;</p>

<pre><code>php artisan optimize
</code></pre>

<p>But this is not right as I expect it to use php56 instead. This command causes the installation to stop with error;</p>

<pre><code>Script php artisan optimize handling the post-update-cmd event returned with an error 
Installation failed, reverting ./composer.json to its original content.
</code></pre>

<p>I am not so sure whether this is due to the PHP version. Is there a way to force composer to always use the php56 prefix or force SSH to run under PHP 5.6 at the command line. Is there anyother to successfully install the Laravel packages or by passing this restriction.</p>

<p>Thanks.</p>