It's certainly possible to utilize PHP with an RPG Maker MV game. As
@Poryg said, PHP is a server side language, so you can use it to manage databases (like MySQL), login system, and such.
RPG Maker MV Javascript is client-side, so you would not "mix everything in the same HTML files". MV is static assets HTML/CSS/JS so you could serve it like a static page (you could also use PHP to serve the static page which is a separate and distinct process from managing the database interactions).
If you're looking for a tutorial, I Googled "rpg maker mv php" and
found this, I'm sure you can find more by searching.
All of this is not specific to RPG Maker MV, it's applicable for any website with client-server interaction. If you don't know the difference between client and server, I recommend you read more about the topic while attempting this.