While John is right, I do want to add that website loading speed is a factor in SEO.
Using just a basic include in PHP won't really impact SEO, however, if the server script is running really slow due to no careful attention to optimizing the code (for example, memory leaking code and code containing loops that almost never finish), then all clients (including google) will see a slow loading website and that can have a bad impact on SEO.
If you decide in the future to add more processing to your script, then I'd suggest testing your webpages with webpagetest.org and in the waterfall chart, look for the light-green bar at the top (1st item requested). That indicates your TTFB. TTFB stands for "Time to First Byte" which means the time (in ms) it takes for the first byte to be downloaded to the client. The lower the number, the better. Google recommends making this number under roughly 200 ms, otherwise they will complain if you test your page using their pagespeed insights tool.
Here's an example of a PHP script that wouldn't affect SEO (assuming header.html and footer.html contain just basic HTML code.):
<p>Test html code</p>
And this script will likely affect SEO:
echo "Test page";
This is because on execution, 50 seconds must elapse before any output is printed. From a user agent's perspective, this means it takes 50 seconds for "Test page" to appear on the screen which in today's world is 49.8 seconds longer than we'd like to wait for a word.