[...]
With PHP 8.2.11 and newer, this issue does not exist anymore as it has been fixed there. When it's fixed, the PHP script immediately exits without any error message. I suggest that the changes from https://github.com/php/php-src/commit/ffd7018fcdd13ca2966149e5141197a02707aff1 get backported to PHP 8.2.7 on Debian 12 (Bookworm). When I apply these changes on top of the above mentioned PHP version, the issue is resolved. At the bottom, you’ll find our tested patch.
I would rather see a proposed-stable-update happen with some newer version of 8.2.x, which would additionally fix those low-priority CVEs from https://bugs.debian.org/1043477
OpenPGP_0x645D0247C36E7637.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature