If it helps to clarify, the documentation with tool/software versions such as PHP is referring to the Build Process/Machine. When you push to Github, it creates a new build, and that build environment has PHP in it. At the end of the build process, it uploads your files to Cloudflare's Edge and creates the deployment. The output files have to be static (html, css, js) or you can use functions, some Javascript frameworks do support using them natively for SSR/etc, but nothing PHP wise.
Functions are Workers with a bit more magic on top of them, which fundamentally run as V8 (same JS Engine chrome uses) Isolates, so a browser-like environment. You can use WASM, but the limit of 5 MB is wayy too small for PHP