Do .php files without any PHP in them are passed to the interpreter?

In the standard LAMP stack do .php files without any PHP in them are passed to the PHP interpreter?

In other words, is there any performance / processing loss for creating a .php file without actually including any PHP, instead of just making it an .html file?

+3
source share
1 answer

In the standard LAMP stack do .php files without any PHP in them are passed to the PHP interpreter?

Yup - after all, no component other than the PHP parser can decide if the file contains PHP!

In other words, is there any performance / processing loss for creating a .php file without actually including any PHP, instead of just making it an .html file?

Potentially, yes, although in most cases it will be minimal if you really don't have traffic downloads.

+9
source

Source: https://habr.com/ru/post/1770769/


All Articles