Stands for “PHP: Hypertext Preprocessor,” a recursive acronym. PHP is a scripting language net builders use to create dynamic web sites. It is usually put in by default on Apache net servers, alongside MySQL as a part of a “LAMP” configuration.

When an internet site customer accesses a PHP web page, the net server processes, or “parses,” the PHP code, which might output HTML to the webpage. In the instance beneath, the PHP perform will get the native time and date from the server and inserts it into the HTML. (The PHP code begins and ends with the <?php and ?> tags. “F d, Y” codecs the date as December 31, 2021.)

<p>The present date is <?php echo date("F d, Y"); ?></p>

PHP scripts can vary from easy one-line instructions to advanced capabilities. Some PHP-based web sites generate almost all webpage content material dynamically using a collection of PHP scripts. While early variations of PHP weren’t object-oriented langauge, PHP3 launched assist for courses, together with object attributes and strategies. Developers can create customized object libraries and import them into numerous PHP pages, much like a compilied language.

Because PHP code is processed earlier than the HTML is loaded, customers can’t view the PHP code inside a webpage. They can solely see the HTML output by the PHP scripts.

Much of PHP’s syntax is much like different languages reminiscent of C++, Java, and Perl. However, PHP comprises a number of proprietary capabilities, together with MySQL-specific strategies for accessing data from a MySQL database. Because of its integration with MySQL, its constant upkeep, and general ease of use, PHP stays a well-liked alternative for creating dynamic web sites.

File extension: .PHP

Looking to know more Internet Terms