Search code examples
phpxamppcomposer-php

How to set php version for composer when having multiple xampp versions?


I have two xampp versions in my machine one have php version 5.4 and other having 7.1(recently installed.) I usually use composer command to download laravel. previously i get laravel version 5.0.X when i download because of my php vesrion(5.4) but even after installing new xampp(having php version 7) composer is downloading laravel 5.0.x only. When i check my php version it is showing 5.4 now how can i choose or connect latest php version to composer so that i will get latest laravel version.


Solution

  • Finally i found the solution. I changed my composer path to new php version and now getting what i want.