Are you also curious to know what PHP is and what it is used for? Today, web design has become one of the most lucrative jobs in the world. If you decide to step into this big world by learning php, you may be confused in the first days of entering this field, like most programmers.
If you intend to choose the PHP programming language with full confidence and knowledge, stay with us until the end of the article What is PHP? We assure you that in the end, you will get answers to your questions about PHP language.
History of PHP programming language and its versions
It all started when the Danish Rasmus Lerdorf wrote a number of scripts in 1994 to manage a series of tasks on his personal site using the Perl programming language. Using these scripts, which were written according to the Common (Gateway Interface) scripting standard, Lerdorf calculated and stored the statistics of people who were reading his resume. By doing this, he drew the attention of many people to his scripts and from They asked him to send scripts for them too, so Lerdorf decided to name his scripts PHP, which stood for Personal Home Page.
PHP2 and PHP3 versions
In 1997, Lerdorf upgraded the PHP language to the second version and was able to attract the attention of many developers. The rewrite of the PHP processing engine was completed in 1998 and released as the third version of PHP. Of course, in this year they decided to give a new meaning to the word PHP. They decided that the middle two letters of the word PHP should no longer be derived from the term Home Page and should be considered as an abbreviation of the term Hypertext Preprocessor.
The meaning of these two letters in simple language is that the PHP language processes the information before displaying it to the user in the form of HTML and then displays it to the user in HTML format. Hypertext refers to hypertext or large texts and It is long, it is possible that an image, table, etc. are used in it, which is actually the same HTML file that the user sees in the form of web pages.
PHP4 version
Gradually, over time, the number of early developers of PHP language was added to develop other parts of this language, and in this way, the PHP programming language became an open source project. In 2000, Zeev Suraski and his colleague Andi Gutmans decided to found a company called Zend. In that company, the core of the PHP language was again put under the scalpel of developers and rewritten. In this rewrite, many changes were made to PHP, the core of which was called Zend Engine and presented as the fourth version of this language.
PHP5 version
PHP was updated to version five in 2004. In this update, we saw many changes and developments in this language, the most important changes of which can be mentioned the support of object-oriented coding and better communication with the database. Therefore, we can consider the fifth version of the PHP language as the turning point of this language in the world of programming, because in this update, many features and facilities were added to this programming language, which made coding with this language even more enjoyable for programmers.
PHP6 version
After version 5.6, the seventh version of PHP was released. Because the PHP language development team decided to add Unicode support to this language in the sixth version so that it can support the characters of all languages in the world. But they could not implement this feature well and therefore decided to stop the development of this version of PHP.
PHP7 version
In 2015, with the release of the 7th version of PHP, this lovely language left its youth behind and entered its maturity. In a sense, we can consider this version of PHP as one of the biggest and best updates of a programming language. Among the important changes of this version, we can mention the improvement of performance, the reduction of memory usage by about 50% and the significant increase in the speed of its execution (about two times). PHP owes this increase in speed and performance improvement to the use of the third version of the Zend Engine.
php8 version
One of the new and happy news for PHP works is the new update of this programming language.
In this version, which was introduced in December 2019, there are important changes, including the appearance of jit.
Jit means that the programs written with this programming language are executed at the same time as processing, and not only this factor has increased the speed of this programming language, the consumption of resources and the resources needed to run the program have decreased. This is only one It is one of the features of this version of php.
What is PHP? Start programming with PHP language
We know that you, like any other programmer, have a lot of enthusiasm to start coding, but in this part of the article, we are not going to enter advanced PHP training, because we are still going to talk about PHP with you. But it is not without grace if you see the Hello World program written in PHP to have a general vision about it in your mind. The following code is written using PHP language which is placed inside HTML codes:
Since PHP does not necessarily need to be used inside HTML code, the shortest Hello World program is as follows:
The PHP interpreter interprets only the code that is placed inside the PHP delimiters, and all commands that are placed outside the delimiters are not interpreted. The most famous delimiter in PHP is the <php? , ?>
Variable names in PHP must start with a dollar sign or $, and unlike many other programming languages, there is no need to specify their type. Variable names in this language are case sensitive. On the other hand, in PHP, newlines and spaces are ignored (except spaces inside strings) and all its commands must end with a semicolon (;).
PHP is an interpreted language
PHP language interprets and executes codes. Interpreted languages are slower than compiled languages, but instead, they are easier to debug or debug. On the other hand, the final product of interpreted languages, unlike compiler languages that provide a single output, is written source code.
What is the PHP language and what is its use?
In this article, we had an overview of what the PHP language is and what path it has taken so far so that it can be considered one of the best programming languages.
If you would like to have more information in this field, click on the word Java.