Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar
Level 27

Downgrade php version

Hello,

I installed XAMPP 7.4.29 hoping that I get PHP 7.4.29 Yet that is not the case.

ref: https://www.apachefriends.org/download.html

F:\xampp79\htdocs\victoryeshop_8\vito>php -v PHP 8.0.18 (cli) (built: Apr 13 2022 07:46:40) ( ZTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.18, Copyright (c) Zend Technologies

I still have PHP 8.0 any idea why?

I indeed installed several xampp and one of them is php 8.0 yet I did not run the xampp. I only run xampp 7.4.29.

0 likes
7 replies
davy_yg's avatar
Level 27

@tisuchi

// the composer one works

composer global require laravel/valet

F:\xampp79\htdocs\victoryeshop_8\vito>valet install

'bash' is not recognized as an internal or external command, operable program or batch file.

I am using Windows 11 why this bash error keeps appearing?

jlrdw's avatar

@davy_yg run phpinfo(); sounds like you have more than one version installed.

davy_yg's avatar
Level 27

@jlrdw

http://localhost/phpinfo/phpinfo.php

PHP Version 7.4.29

F:\xampp79\htdocs\phpinfo>php -v PHP 8.0.18 (cli) (built: Apr 13 2022 07:46:40) ( ZTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.18, Copyright (c) Zend Technologies

Two different version when I check through phpinfo and through php -v

jlrdw's avatar

@davy_yg somehow the wrong version is called in the command line. You must have an environment variable in operating system looking for a certain version.

Check things like this.

davy_yg's avatar
Level 27

@jlrdw I already change the env var to this:

which suppose to php 7.4.29

F:\xampp79\htdocs\victoryeshop_8>php -v

PHP 8.0.18 (cli) (built: Apr 13 2022 07:46:40) ( ZTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.18, Copyright (c) Zend Technologies F:\xampp79\php

davy_yg's avatar
davy_yg
OP
Best Answer
Level 27

It's finally works by typing this:

F:\xampp79\php\php.exe artisan serve

Please or to participate in this conversation.