In my case I updated the php version of Xampp (Windows) manually from 8.2.12 to 8.2.27 replacing the files in the xampp/php folder with the ones downloaded from php.net
The problem I had was that the console gave me the ok version when I ran a php -v but when I printed a phpinfo() it gave me the old version...
Then I found that the non-thread-safe version does not include 2 files that seem to have to do with the version that the phpinfo() function shows; php8apache2_4.dll php8ts.dll
What I did was download the Thread-Safe version (instead of the non-thread-safe one) and replace it again.
After that everything worked fine and gave me the correct versions in both environments.
Download PHP Thread Safe from official page https://windows.php.net/download/
This package contain phpXapache2_X.dll
Don't download phpXapache2_X.dll from other source. It can be other version, or x86