So, I decided to re-work it to use Static PHP, and after struggling with differences between versions of bash, I've finally got it working and ready for others to try out.
Be warned, it’s experimental!
It’s using the pre-compiled Static PHP artifacts, but if this works well, and there’s interest, I’ll set up my own build system and hosting, so I’m not taxing their resources and can offer different combinations of extensions.