What is PHP?
Just like HTML, CSS and JavaScript. PHP has its purpose as well. In this What is topic I’ll go over what PHP and its file extensions are, what its purpose is and some examples of PHP in use.
PHP is a Hypertext Preprocessor scripting language that is used to make websites more interactive and dynamic. Unlike HTML, CSS and JS, PHP is a server-side scripting language or a backend scripting language. You can identify PHP files by looking for the .php extension; however, you may also see PHP being embedded within a .html document. You can spot PHP in an HTML document by looking for the similar syntax below: (<?php and ?>) between the <body></body> tags, PHP statements usually end with a semicolon (.
PHP can be used to have a login/registration system. It can create, open, read, write, delete, and close files on a server. PHP can also be used to collect data, add, delete and modify a database and can also be used to encrypt data. You can view more here: https://www.w3schools.com/php7/php7_intro.asp
Here are some examples of PHP in action:
Example(s) from w3schools:
Of course, please correct me if I am wrong.
Sources:
https://simple.m.wikipedia.org/wiki/PHP
https://www.quora.com/Why-is-PHP-a-secure-server-side-scripting-language
https://developer.mozilla.org/en-US/docs/Glossary/PHP
https://www.w3schools.com/php7/default.asp
Just like HTML, CSS and JavaScript. PHP has its purpose as well. In this What is topic I’ll go over what PHP and its file extensions are, what its purpose is and some examples of PHP in use.
PHP is a Hypertext Preprocessor scripting language that is used to make websites more interactive and dynamic. Unlike HTML, CSS and JS, PHP is a server-side scripting language or a backend scripting language. You can identify PHP files by looking for the .php extension; however, you may also see PHP being embedded within a .html document. You can spot PHP in an HTML document by looking for the similar syntax below: (<?php and ?>) between the <body></body> tags, PHP statements usually end with a semicolon (.
PHP:
<?php
echo "My first PHP script!";
?>
PHP can be used to have a login/registration system. It can create, open, read, write, delete, and close files on a server. PHP can also be used to collect data, add, delete and modify a database and can also be used to encrypt data. You can view more here: https://www.w3schools.com/php7/php7_intro.asp
Here are some examples of PHP in action:
Example(s) from w3schools:
PHP:
<?php
echo "Hello World!";
?>
PHP:
<?php
$txt = "Hello world!";
$x = 5;
$y = 10.5;
?>
Of course, please correct me if I am wrong.
Sources:
https://simple.m.wikipedia.org/wiki/PHP
https://www.quora.com/Why-is-PHP-a-secure-server-side-scripting-language
https://developer.mozilla.org/en-US/docs/Glossary/PHP
https://www.w3schools.com/php7/default.asp
Last edited: