What is PHP ?

We are updating PHP to 7.2 | One.com blog

Perhaps many of us today know that programming languages are like "the unknown soldier" in our dealings with this vast and diverse virtual world, and you may be among the millions in this era who intend to learn a new programming language, which they may consider better than any human communication language. Have you thought of a suitable option !?


Or simply, have you ever wondered about the programming language in which a website is written, such as Facebook, for example, which you may use daily, and for hours !?

It is PHP.


PHP concept

PHP was originally a set of applications written using Perl language, and today it is known as a server-side scripting language.

Designed primarily for developing and programming web applications, it can also be used for broader general purposes, such as producing stand-alone programs that are not only web-related.


Establishment and history of PHP

It was originally created by Rasmus Lerdorf in 1994, and released a year later.

After several years, two university programmers, "Zeev Suraski" and "Andy Gutmans", rewrote the base of the original version and launched the version that was then called "PHP3".


The meaning of the term PHP

The most popular interpretation of what PHP stands for is (PHP: Hypertext PreProcessor), but this would make the term expressed as: (HPP), which is akin to being a reverse acronym!

Generally; An alternative explanation is that the initials come from the older version of the language program, which, given its purpose, was called "Personal Home Page" tools: (Personal HomePage).

At least you get the letters (PHP) in the correct order!


What is the meaning of “server side programming language” !?

The most basic and creative application of PHP is when it is used on a server side. In fact, it was designed for this purpose to build interactive websites and web applications in a safe, inexpensive, and reliable way.

What is the meaning of saying this !?

This is because PHP is not executed on your computer (which is generally expressed as “client”), but on the computer you requested the page from; It is the “server” that is used to display web pages dynamically, then the results are delivered to you, and displayed in your browser.

Let's take a classic example - to verify login. If you want to log into a special account for any website, you will fill in your username or email and password. The data for these two fields will be sent to the server running this chosen site.

right Now; A server whose validation source is written in PHP will verify your data and move to your user account, and only if the field pair matches its database, otherwise the fields will display again with the necessary error message (usually marked in red ).

All verification, additional processing - if necessary - is performed by a PHP script on the server, and only the requested results will be sent to the user.

Unlike Java Script, the source code written in PHP is not visible to the end user. That is, it is "not understood by the browser."


Spread and popularity of PHP

When we talk about the Internet today, we are faced with a term that is very difficult to measure, and its diversity and resources.

But PHP has the upper hand in front of all this!

It's powerful enough to be at the heart of the largest blogging system on the web (WordPress).
It's deep enough to power the world's largest social network (Facebook).
It is wide and sufficiently branched to create the world's largest electronic knowledge encyclopedia (Wikipedia).

Two decades after its inception, PHP has registered tremendous growth and remains very strong to the present day. It controls more than 80% (eighty percent) of all locations on the globe, and this includes the above-mentioned specialties, and many more.

So, with millions of websites built with PHP, it's no wonder we need to understand their impact on developers in general, and on the coding world in particular.


Common uses for PHP

PHP often runs on a web server, but in addition it is a wide area for many tasks and uses, and we can mention many of them below:

1- With PHP, you can work on "web applications"; Such as creating login pages for your username and password, checking details from a form, creating forums, photo galleries, surveys, and much more.

2- It is generally used to improve web pages.

3- PHP implements system functions, i.e. through files on a system, that can create, open, read, write and close.

4- PHP can handle forms.

5- Through PHP, data can be collected from files, data saved to a file, or via e-mail, and data can also be sent and data returned to the user.

6- Items can be added, deleted or modified within the database.

7- You can access cookie variables and set cookies.

8- By using PHP you can restrict users' access to some of your website pages.

9- The data can be encrypted.

10- It can be used as a "command line"; PHP provides a command line interface, so it can develop a set of programs that facilitate administrative tasks for system administrators.

11- Use them as the "customer" side; PHP provides graphic interface libraries. This makes it possible to develop non-web based programs (running on the user's computer).


PHP features

PHP looks like a winged horse for programmers trying to shape the world with their colorful and runaway virtual imagination; For a web developer, designing a complex and attractive website in a short period of time is a big challenge, especially since the websites are now more dynamic, less rigid and stable. 1

This is where PHP proves itself with these properties:


Compatibility

PHP works on a wide variety of platforms (Windows, Linux, Unix, Mac OS X, etc.).
Fully compatible with almost all web servers and major companies (Netscape, Apache, Microsoft IIS, etc ...).

Ease of learning and use

PHP is one of the easiest languages ​​to learn. It relieves you of all the complications of memory management and the intricacies of word processing found in C on the one hand, and a lot of weakness in the interface and design of the Perl programming language on the other hand.
PHP has a very clear and fixed structure and rules, in addition to its structural structure, which is very similar to the structural structure of C language, most of the grammar is taken from C, Java and Perl to make a programming language that is easy and smooth without losing any elements of the power in the language.
Most developers are fully familiar with C language; C is the building block of all developing languages.
PHP uses C as a “bulk syntax” tool!
You will gradually discover how PHP facilitates the most difficult and humiliating obstacles for the programmer so that he is completely devoted to creativity.


The speed

The vital aspect, and the main concern of most users of our time is speed, and given the fact that some people who use the Internet are still suffering from the challenge of the speed of Internet data, the rapid download site will be more appreciated and preferred for these people, and this is what I have surpassed PHP language.

PHP is the fastest resource available for creating dynamic websites.
The PHP support and development community continues to improve language performance, and the best evidence for this is that the latest version of PHP 7.x is two times faster than the PHP 5.x version.


Use and interact with other languages

PHP is used to make websites dynamic, while others like HTML and CSS only provide structure and design.
PHP code can be included in HTML, and can be used with different web template systems, web content management systems and web frameworks.
If you come across a web page ending in PHP, this means that the programmer has written some programming code to activate and improve the HTML code.
The HTML code can be separated from the PHP code using a set of functions called “template drives”.
PHP code is well organized and can be easily included in HTML code.
Moreover, it is easy to troubleshoot PHP problems compared to other languages.
PHP can be used for almost everything you can do with all textual languages ​​on the web.


Protection and powers

Although PHP offers a lot of advanced features, but in return it provides appropriate ways to set limits on these features, you can control the number of connections allowed to the database, for example, or the maximum size of files that can be sent through the browser, or allow the use of some features or cancel their use.
All this is done through the PHP configuration file which is controlled by the webmaster, which allows an advanced stage to deal with heavy traffic with ease.


Open source, expansion and support

As mentioned earlier, PHP is an open source language, developed and maintained by a large group of developers and volunteers under the PHP license. This enables everyone to collaborate and work on it, and as such we see that there is a broad support community around PHP.
PHP allows developers to write add-ons for them using the C language, to add new functionality, and this allows an ample add-on library.


Free

PHP is completely free. All features and updates from PHP are available free of cost, simply downloadable from the official PHP website: php.net.


Stability

With a language that has been on the scene for more than 20 years, and with a community of full-fledged developers, the experience has crystallized and most of the language's flaws and errors have been revealed over the years; So PHP is a "very stable" language.


Strong support for databases

PHP supports a wide range of databases. As the most common programming language on the Internet.

This is because the database is important to many websites including e-commerce and many other types of websites. When creating a website that is powered by data or content, the database will be used repeatedly, and here PHP is useful in managing this type of website, as it greatly reduces the amount of time needed to create a web application.


PHP flaws

Despite its many advantages, richness and diversity, PHP also has some drawbacks:

Not designed to create massive apps

With the way PHP is created (before processing), it will be difficult to use for programming large applications, which are intended here by the client (mainly outside the web domain). Since it is not very typical, it will be difficult to maintain the huge applications built from PHP.

Although it is a great language for website programming and small app development, it is not advisable to use PHP to create a huge app. This may be due to the fact that PHP was more developed for use in website development than for creating applications for use on Windows and other operating systems.


Safety

The open source nature of PHP seems to be both a feature and a disadvantage. Since everyone can see the PHP source code, it is possible for the hacker to recognize errors in the code and later use such errors to attack users who are not aware of it.

However, on the whole, there is a constant need to secure websites as much as possible, and in all ways, both to protect the website owner, as well as users of the site.

however; PHP is a very popular programming language and has become very popular since its foundation and beginning its development in 1994, and it is currently used by a large number of people to create different types of applications. Although it is mainly used as a server-side scripting language for websites, some may find it used to create applications for Mac, Linux, and Windows.

There are - undoubtedly - some advantages and disadvantages, however, the widespread use of PHP gives us the fact that "advantages replace defects."

And if you are on the threshold of creating your own website, and want to supplement it with all your innovative ideas, and possibly crazy, PHP - and most likely - it will be the best way!


Author : Hassan Adrah
Source : Link