A coding language for producing dynamic web pages. It was created by Rasmus Lerdorf in 1995. It has the abilities to send SQL queries and to output HTML, and can be described as the link between the database that stores all the content on a site, and the HTML that lets you view it.
PHP's platform is the web server. It's a high-level interpreted scripting language, but it has the lowest-level access of any web server language.
PHP Code Example:
<?php function add($x, $y) {
$total = $x + $y;
return $total;
}
echo "1 + 16 = " . add(1, 16);
PHP is a bit different to JavaScript. PHP scripts are executed by the server that hosts a website, while JavaScripts are executed by the browser viewing a website. While JavaScript focuses on effects and interaction, PHP's main jobs are to send SQL queries to the MySQL database program, and to receive data from the database to output as HTML.
Although some modern coders have neglected it in recent years, PHP remains hugely popular as a web coding language. It's used by the likes of Facebook, WordPress and Wikipedia.