If you are using new version of xampp.
Try http://localhost/dashboard/phpinfo.php
Answer from Prosenjeet Paul on Stack OverflowIf you are using new version of xampp.
Try http://localhost/dashboard/phpinfo.php
Put this code in your root directory or htdocs folder of xampp:
<?php phpinfo(); ?>- Save it as phpinfo.php and point your browser to it (this could be http://localhost/phpinfo.php)
- Example: random image (Click Here)
Is there a way to upgrade version of PHP of my local XAMPP without destroying anything??
how to update xampp to be compatible with php 8.3.1?
How to update XAMPP PHP version - PHP - SitePoint Forums | Web Development & Design Community
PHP Version confusion (OSX, XAMPP)
Videos
Put this in your root directory:
<?php
phpinfo();
?>
Save it as phpinfo.php and point your browser to it (this could be http://localhost/phpinfo.php)
- More information (you can get much more information than just the version).
- Example (random image):

Try with command from terminal
sudo /opt/lampp/bin/php -v
So yesterday I was viewing a course where the tutor installed composer and through that downloaded twig version 3.0. I tried to do that but it stuck saying I dont have php v.7.2 or smth like that so i downloaded twig v.2.0 and all worked well.
That though, made me think. I've got that XAMPP portable in my USB stick for years now. Sometime I'll need to update php version and i guess many more.
Is there a way to do this without destroying anything in the XAMPP files?