This content originally appeared on DEV Community and was authored by Enakshi Pal
Do you know about Personal Home Page ? Yes, it might be your own personal website but, wait! Here we are not going to learn about how to make one but, surely will look into the term Personal Home Page.
Well, by now you have got a glimpse about what it is going to be.
Yes! It is PHP. Earlier, it was known as Personal Home Page . But now, it is an acronym for Hyper Text Pre-Processor .
If you are familiar with the basics of any programming language like C, Java then learning PHP for you will become a walk in the park.
PHP is an open-source, server-side scripting language and also a widely-used powerful tool for making dynamic and interactive web pages. To implement PHP, one should have a basic idea about HTML, CSS and JavaScript.
Despite of being one of the oldest programming languages, PHP got rid of most of the glitches and has now become one of the simple, flawless and fastest programming languages for web development!
Why hover around PHP?
Because,
• It is one of the easiest languages to start off as a beginner.
•It supports a wide range of databases.
•It is compatible with almost all servers used today. The most common being Apache, IIS etc.
•It is efficient and free to use.
Just like any other programming language, PHP has all the basic features in it. Additionally, it has an interesting feature which keeps me moving around PHP, is – The Superglobals.
Here’s a sneak peek of The Superglobals.
Superglobals: They are pre-defined variables, which are always accessible, regardless of scope and we can access them from any function, without having to do anything special.
The Superglobal variables are:
• $GLOBALS
• $_GET
• $_POST
• $_SESSION
• $_COOKIE
• $_SERVER
• $_REQUEST
• $_FILES
• $_ENV
Note: In PHP, we declare a variable using ‘$’.
Did you know?
Being a scripting language, PHP has OOP features as well, since PHP 5. Also, it allows you to write your code in two flavors, one is procedural and the other is object oriented! Definitely sounds fascinating as a beginner, doesn’t it?
PHP has all the basic OOP features, which makes it faster and easier to execute.
Why not unfold some other perks of learning PHP?
Before unfolding them, let’s consider an example. Assume that you have decided to start a business. You open a dog treat bakery and would want to represent your bakery all around through a website. You have designed the website using HTML, CSS and JavaScript, added some photos about your products. So, you are done right?
But hey? How would you interact with your customers and accept orders in a large number through your static website?
In order to make it dynamic, you need to store the data of those many customers at a time. To achieve that you need a database.
Here comes MySql into the picture. MySql is the most popular database system used with PHP.
With PHP and MySql, we can connect to and manipulate databases. However, we can create the connection between MySql and PHP by using: mysqli_query()
PHP + MySql = cross-platform i.e., We can develop in Windows and serve in a Unix platform.
So, these are some of the very basic and interesting features of PHP which made me plump for it as my very first scripting language. Also, it is not possible to list down every feature of PHP for the sake of the length. Still in a hesitation to go for PHP as a beginner? Let me melt the ice for you, PHP 7 is faster than Python and Ruby!
Although most of the developers don’t really like PHP, as it has been stagnating for over 20 years now. Despite of this aversion, every year a new version of PHP is released with a précised agenda.
As we all know, a programming language always evolves but, its reputation doesn’t. So, keep exploring and keep learning!
This content originally appeared on DEV Community and was authored by Enakshi Pal
Enakshi Pal | Sciencx (2021-05-16T07:45:33+00:00) PHP in a Nutshell, for beginners.. Retrieved from https://www.scien.cx/2021/05/16/php-in-a-nutshell-for-beginners/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.