I don’t think Search engines care whether it’s html or php page. In the past they didn’t tend to understand the variables on a dynamic (php) page but look at amazon or ebay etc and they are full of variables and still get searched.
It’s probably more for users but you can also create ‘clean’ urls where the variables are part of the url
Note you can even code it to remove the .php part.
You can even get the server to treat ,html pages as .php pages if you really wanted to. But i prob wouldn’t do that.
Alternatively you could get really clever and create dynamic pages which are processed and cached in a database so only the cached complete version is shown to users, which is what a lot of the cms systems seem to do. But probably overkill if you are not doing loads of queries.
If i was you i’d use PHP pages as you can do as you mention and include other parts into the page etc and create dynamic content. Just follow usual SEO advice and you’ll be fine
That is not my understanding of how PHP Includes work. The PHP is processed on the server side, and the complete page is served to the browser. The browser does not know that parts of the page were inserted using PHP; it just sees the complete page and will cache the page as a whole.
Using PHP includes is useful for coding because if you make a change to a common area of the site, such as the header, you need only update the one include file, not every single page. For this reason, I’d recommend using PHP for all pages. Whichever you choose, I’d say stick to one or the other; don’t mix and match.