Overview of PHP

Overview of PHP

Nowadays PHP is one of the most popular server-side scripting languages, used to make dynamic websites, PHP started with a small personal project but nowadays people found it very useful to make large projects like youtube.com, favebook.com, etc.

* The full name of PHP is PHP: Hypertext Preprocessor
* PHP is a server-side scripting language that is embedded with HTML.
* PHP supports a number of database systems like MySQL which is inbuilt with wamp and xampp, SQL, etc.
* PHP supports many protocols like POP3, IMAP, and LDAP.
* PHP 5 and above supports object-oriented programming.
* PHP syntax is similar to C.

Writing Style of PHP code.

PHP code must be written inside a particular tag as it is embedded with HTML. I am showing here the most popular types or process of writing PHP scripting code.

* the default way to write PHP script is open with <?php tag and close with ?> tag and inside that write php code.
* another way to write PHP code is open and close with <? and ?>, that is the difference with the upper one is just remove the text PHP but for local have to setup.
* there is another way also to write php script its like as java-script code. and the opening and closing tag is, <script language = “php”> and </script>

an example is given below.

<?php Write PHP code here ?>

<? Write PHP code here ?>

<script language = "php"> PHP code should be written here </script>

What we can do using PHP?

using PHP we can perform several tasks, but in the front end, we can only show HTML or image or pdf. but the server-side opportunities are as described below,

* we can create, add, edit, delete files on server side.
* from the server side we can generate dynamic content.
* We can collect form data that is submitted and use that.
* we can save and collect session and cookies.
* we can be able to restrict user interface.
* can be able to make encrypted data, one-way encryption also
* we can perform database interface.

Why should we use PHP?

* The first one is PHP is open source.
* there is a lot of tutorials available on the internet.
* It supports multiple platforms
* nearly all server provides PHP as pre-installed.
* PHP supports multiple numbers of the database.

Make your first program by printing Hello World! using PHP.

Below there is a code given on how to print a hello world! text using PHP it should be your first programming written in PHP.

<!DOCTYPE html>
<title>First PHP Program</title>
<?php echo "Hello World!"; ?>

I hope it will help you to understand why should we use PHP as a programming language to make a dynamic website.

Thanks for reading.

Share The Post On -

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.