Look at what happens after a visitor clicks
Static hosting works when the server can answer by sending an existing file. Choose PHP hosting when code on your server must run for a request. A page with a contact form can be static if the form submits to an external service. If the form submits to your own PHP handler, put that handler on a PHP deployment.
For example, a club’s event schedule can be a hand-edited HTML file. Its members-only attendance page may need to check a session, query registrations and return a different result for each person. Open the form markup and find its action URL. Then find the code that receives that request. This tells you which part of the site actually needs a server-side language.
Lay out a PHP project on Bothosting
Choose PHP site under Website hosting. Put index.php inside the intended document root, such as public/, and use public/index.php for MAIN_FILE. Keep internal configuration and private includes outside the published directory.
If your project uses Composer, include the manifest and lockfile at the project root. The PHP startup script installs production dependencies when it finds composer.json. Packages under require-dev are skipped, so put a library needed to handle real requests under require.
Prove a PHP request was executed
The PHP starter renders the current UTC time. Start it, open the platform address and request the page again a few seconds later. The time in the response should advance. That small check exercises both the web server and PHP before you introduce your own form, mail provider or database. Then submit a test entry and verify it reaches the destination that your handler uses.