Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
dmonkey21132yA software (web server, fpm, whatever) is told that the file contains PHP code. It will parse the PHP file. So yes.
In order to not have any impact at all, the software must guess with a crystal ball that the file does not actually contain any php tag.
Edit
Will the overhead be relevant? I highly doubt. Yet, there must be. -
JS96182592y@dmonkey Yeah, thinking longer about it, it makes totally sense, so the question is more about how efficient the php parser is, I guess a lot.
Thanks for the answer! -
dmonkey21132y@JS96 It could have make some difference 30 years ago. With modern CPUs it's not relevant.
Related Rants

What only relying on JavaScript for HTML form input validation looks like
Yeah no
Hey, have you ever wanted to punch a developer 8611 times before?
I can't find a complete answer to this question, maybe this community has one:
Does putting an html file, with pure html code (without any php), as .php have any impact (or is processed differently) on the server load compared to simple .html?
Of course, if the content doesn't contain any php code to be processed it doesn't affect the performance, but the simple fact of declaring it as .php cause a different processing root on the server to output the same html result?
I'm aware that if there is any impact, not sure yet, tt's probably negligible, but I'm just curious about the backend root followed.
So, anyone know how exactly these two scenarios are handled (step by step) by the server?
1) Request of pure html as .html.
2) Request of pure html as .php.
My instinct says there must be an additional step in the second scenario to interpret and search for php code to execute.
There is? And does it have any calculatable impact, that multiples for X requests (ignoring caching) and depends of the length of the file?
Thanks
question
php
html