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

binggle's avatar

how to sync cli / web version of php ?

Hi. I am using valet on mac.

I need to keep php 8.0 / 7.x together.

I installed both via brew.

I change php version with 'php monitor'.

When I check , it is php 8.0 on console.

PHP 8.0.6 (cli) (built: May 13 2021 05:34:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.6, Copyright (c), by Zend Technologies

And I made laravel fresh projects and edited route to check phpinfo()

in web.php

Route::get('/', function () {
    phpinfo();
});

On browser shows php 7.x version.

    PHP Version 7.4.19

How can I sync my php version ?

0 likes
1 reply
binggle's avatar
binggle
OP
Best Answer
Level 3

I solved.

This is how I did.

valet stop
valet uninstall
rm ~/.config/valet/valet.sock
valet install
valet start 

Please or to participate in this conversation.