The docs I referenced are not the official documentation, but rather mind-bendingly bad systems I've had to deal with that were undocumented.
PHP isn't necessarily bad. But bad experiences mean I hate it.
Hide the PHP in a nice self-contained system, and I won't care, plus it'll simplify install/setup.