Php in services list instead of php@7.3; php links wrong

Hi, I have php@5.6, 7.0–7.3 installed, but not just “php”:

brew services list | grep php
php        stopped             
php@5.6    stopped             
php@7.0    stopped             
php@7.1    stopped             
php@7.2    stopped

I didn’t install just php and “brew doctor” says:

brew doctor
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
php

So I want to fix this.

If I “brew uninstall php”, it removes php@7.3 (but I need 7.3):

brew uninstall php
Uninstalling /usr/local/Cellar/php/7.3.2...

If I make “brew link php”, it links to php@7.3, but I use another version with sphp.

I think when it would be fixed it said:

brew services list | grep php           
php@5.6    stopped             
php@7.0    stopped             
php@7.1    stopped             
php@7.2    stopped
php@7.3    stopped

but it doesn’t.

Thanks

Unversioned formula use the latest upstream release which, at the time you wrote this, is 7.3 for php.

So, how can I keep it linked to the current version after switching versions with sphp?

I don’t know how sphp works. You’ll have to ask the sphp devs.