There’s two parts to your question:
- Can Hugo output
php
files?
Yes, if configured correctly.
- Will Hugo run the
php
code?
No. Unless you have server magic going on, but that is outside of Hugo.
Have you read through this topic?: Is it possible to use Hugo template functions and variables in a PHP file?
The first part we can probably help you with, but it will be easier if you had your code in a repo somewhere easily clone-able.