This article describes what a PHP file is and how it is used in the context of a web server. We will also look at how to open a PHP file on your computer.
php file open read and close || php fopen function – 1
A file with the PHP file extension is a PHP source code file that contains Hypertext Preprocessor code. They are often used as web page files that generate HTML from a PHP engine running on a web server.
The HTML content that the PHP engine creates from the code is what is seen in the web browser. Since the web server is where the PHP code is executed, opening a PHP page does not give you access to the code, but instead gives you the HTML content that the server generates.
Windows' built-in Notepad is an example of a PHP opener, but syntax highlighting is so useful when coding in PHP that a dedicated editor is usually preferred.