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

Shady Hesham's avatar

how to upgrade php version in laravel 8

hello i need to upgrade php version to be 8.0 and I am running (PHP 7.3.29). here is my composer info "php": "^7.3|^8.0", I went to change it to "php": "^8.0" but it does not work

0 likes
4 replies
Snapey's avatar

You have to install the later version. Changing in composer only limits what versions composer will set as a minimum requirement. It does not change the version.

Instructions for installing a different version are OS specific

Shady Hesham's avatar

@Snapey if I understand you correctly, I am using XAMPP OS X 8.0.9 which uses PHP Version 8.0.9. so, may I how to upgrade my version?

Snapey's avatar

@Shady Hesham is it not a setting in xampp ?

can't really help other than googling it, personally I install different versions with Homebrew

Shady Hesham's avatar

@Snapey when i open /phpinfo.php in xampp I see that I am running PHP Version 8.0.9 but my laravel project does not see it

Please or to participate in this conversation.