0

On my Windows 10 PC, CMD shows only the latest upgraded PHP version 7.4.6 and NOT previous version 5.5.12 which was originally bundled with WampServer 2.5.

CMD displays:

enter image description here

However I have two PHP versions installed but at the moment older version is active:

enter image description here

To fix this issue, I manually added PATH in Environment Variable:

enter image description here

But it didn't make any difference.

So how can I see old PHP version (or both) in CLI?

Query Resolved

I found that it was composer whose installation time I had selected newest PHP version. When I changed PHP path in composer installation again and selected older version, CLI starts showing me exactly this old version. I had not aware of my composer installation PHP path at the time of asking this question.

Sachin
  • 1,646
  • 3
  • 22
  • 59
  • You should never put any version of PHP into the PATH with WAMPServer precisely because you may want to use multiple versions from the cli PS you have BOTH versions in your PATH and 7.4.6 is first – RiggsFolly Jun 23 '20 at 17:15
  • 1
    Because the directory to 7.4.6 is first in your PATH. If you type `C:\wamp\bin\php\php5.5.12\php.exe --version`, then you will get the 5.5 output. – Luuk Jun 23 '20 at 17:15

0 Answers0