I wish you would ship PHP 7 as an option in Bookworm as well.
This will not happen, but the easiest way is to install this repository:
https://github.com/oerdnj/deb.sury.org/wiki/Frequently-Asked-Questions#how-to-enable-the-debsuryorg-repository
It works out of the box and can provide all php versions you would need.
They all can be installed on the same server.
As a fact: I use them on my Debian bookworm workstation (7.1,2,3,4 &
8.1,2).
I hope my quick (non maintainer) reply will help you solve this php
version issue ;)
Reminder: upgrades need to be done some day.
See: https://endoflife.date/php
--
William Desportes