• About
  • FAQ
  • 210,19-A, MPSEDC IT Park, Electronic Complex,Indore(MP)

Have You Ever Heard About Server-Side Scripting Language

pattern
blog

Any Programming Language has mainly two types of scripting components:-
 

•           Client-Side Scripting (HTML, CSS, JS) used for Designing Frontend part.

•           Server-side Scripting (PHP, JAVA, PYTHON, RUBY, etc.) for Backend operations.
 

Today,

We tell you something about the oldest Server-Side Scripting Language, i.e., PHP.

If you don’t know about Server-Side Scripting it is something like a user, send a request from its end to a server or database with the help of Hypertext Transfer Protocol (HTTP) and File Transfer Protocols (FTP).

In return, the server searches for the query in its database and responds to the user accordingly. So, to respond to users’ query it uses Server-Side Scripting Language. 

PHP is the oldest Server-Side Scripting Language, it was introduced by Rasmus Lerdorf in 1994 a Canadian Danish Programmer, who was not trying to develop a programming language. According to him, he was just adding the next logical step one after another and after months of consistent hard work and beta testing, officially released PHP in November 1997.
 

He used to write CGI (Common Gateway Interface) programs in C, which he used to maintain his Website Homepage. He integrated these CGI to work with web forms and to communicate with databases for fetching data and named this process of creating forms and fetching data as "Personal Home Page/Forms Interpreter".

Therefore, it was named as “Personal Homepage” firstly then later on it changed to “Hypertext Pre-Processor”.


Syntax of PHP: -

<? Php

Echo “Hello I am PHP script”;

?>

//output: - hello I am a PHP script.

 

Some Points to Remember The Basic & Important Things as a Beginner: -

 

•           Echo(“text”); // Echo” text”; are used as output statements. Always put a; after every statement in PHP.

•           Print is also used as output statements but is slightly slower than an echo.

•           Print has a return value i.e., 1, echo has not.

•           Keywords in PHP like if, else, while, echo, classes, functions, and user-defined functions are not case-sensitive which means echo/Echo/ECHO all are treated as equally it doesn’t matter which case you use.

•           On the other hand, variables such as $color /$COLOR /$Color are case sensitive that means all are three different variables doesn’t matter the name is the same.

•           Always use the $ sign before declaring a variable name.

 

Comments in PHP:-

•           <?php

// This is a single-line comment

 

# This is also a single-line comment?>

•           <?php

/*

This is a multiple-line comment.  

*/

?>

 

PHP Supports The Following Data Types:

•           String

•           Integer

•           Float (floating-point numbers - also called double)

•           Boolean

•           Array

•           Object

•           NULL

•           Resource


Arrays in PHP are used to hold different type of data in a single variable: -
 

<?php

$cars = array("Volvo","BMW","Toyota");

var_dump($cars);

?> 
 

The PHP var_dump() function returns the data type and value of array elements like above code output can be shown as:-
 

Output // array (3) { [0]=> string(5) "Volvo" [1]=> string(3) "BMW" [2]=> string(6) "Toyota" }

 

Some Great Facts About PHP: -

PHP was used to develop more than 240 million websites and was installed on 2.1 million web servers till the year 2013. After the stable release of PHP5, we can use oops functionality in PHP also.

According to the latest updates after its 8.3 version in March 2021, PHP was used as the Server-Side Programming Language on 79.1% of Websites.


PHP 7 is the most used version of the language with 50.3% of all Websites on the web are using that version.

 

Book a Discovery Call