Updating PHP to higher version

Hi guys, first time poster here and would like to ask a few things:

  1. Im currently using Matomo 4.14.2 with PHP 7.3.5 and im getting the banner telling me that PHP is outdated and I should upgrade it. Would Matomo 4.14.2 be compatible with PHP 8.3.x?

2a. How would I go about upgrading PHP to 8.3 given that Im using Apache 2.4 for the server? Should I just repoint the loadModule binary location for PHP to the new PHP binary?

If I remember correctly, Matomo 5 is compatible up to PHP 8.3 and Matomo 4 up to PHP 8.2.