What is PHP?
Hypertext Preprocessor (PHP) which was earlier called as Personal Home Pages is a server-side scripting language. PHP is useful in developing dynamic or static websites and Web applications. For interpretation of PHP scripts on any server, PHP must be installed. For retrieving the scripts on a client computer, a web browser is required. The mark of PHP file is that its extension is ‘.php’
What is Scripting Language?
A set of programming instructions which are interpreted during runtime is known as a Script. For this, a scripting language is used. Usually, software environments have scripts embedded in them.
Scripts are used in improving the performance of an application and in performing routine tasks. The scripts on the server side and the client side are interpreted on the server and by the client application respectively.
Apart from its use into HTML, it is also combined with the web template systems, frameworks, and content management systems on the web.
PHP Full Form in Hindi: हाइपरटेक्स्ट पूर्वप्रक्रमक या निजी होम पेज
File Extensions of PHP
For the ease of the server in identifying the PHP scripts and the files, PHP files must be saved as ‘.php’ as an extension. Following extensions were used in place of .php in the early days such as ‘.phtml’, ‘.php3’, ‘.php4’, ‘.php5’, ‘.phps’ etc.
The design of PHP is such that to embed it in the HTML code and work accordingly. But one can create PHP files without the use of any tags from HTML. This is known as the Pure PHP file.
After interpreting the PHP code on the server, the result as HTML code is sent to the web browser for displaying the page. To help the server differentiate between PHP and HTML codes, one must enclose the PHP codes with PHP tags.
PHP tag initiates with <? And then ‘php’. In PHP, one must keep in mind the upper and lower cases. “INT” and “int” are not the same. Whereas the PHP tags are not case-sensitive, still lower case letter is recommended.
The codes in one line are known as Statements. PHP statements must terminate with a semi-colon (;). In the case of only one statement, semicolon can be skipped. But for more than one statement or set of statements, a semicolon must be used after every line. Thus, for foolproof, one must always end every line with a semi-colon. The server executes the scripts in PHP. The output is in the form of HTML code.
- Full form of PHP is Hypertext pre-processor
- PHP language is executed on the server thus it is a server-side scripting language. Because of the server, it is not mandatory for the client to have PHP installed.
- It is an open source and also a cross-platform.
- PHP codes must be enclosed within PHP tags (<?php ‘code’ ?>) and the file must have a format of .php “Stay Informed and connect to Today’s era Full Technology for the latest updates.”