an extension is how your operating system recognizes your file and decides what to do with it, for example, which application should be opened.
php is a server side scripting language. It is interpreted by the web server on which php is installed. For example, for example, in XAMPP, the php.exe file in the XAMPP / php folder interprets the php file / command.
HTML is the standard for sending information over the Internet. Thus, the end result of your file is an html page, despite any server-side scripting language you use. The web server you are using will process the php commands and convert them to the corresponding html and send them to your browser. Then the browser processes (compiles) the html code to display your web page.
HTML is all that you see in your browser. PHP is used to interact with the web server and process information that the user enters in the web browser through forms or executes basic third-party scripts (for example, TCL scripts) using the link to perform automation functions in the background, hidden from the user who uses A website either parses an XML file or extracts information from a database or maintains session information and much more.
In general, PHP handles the interaction of a web application with a server configured to run PHP. HTML just dumps the results in the browser.
You can think of it this way: HTML is just what your website looks like ... PHP is what makes your website intelligent so that it can interact with the user ...
you get the same result because php can be embedded in html and your web server processes both files to give you the same results. However, if you did not have php installed on your web server, you will receive it in your browser.
user806168
source share