PHP is a server-side scripting language. that is used to develop Static websites or Dynamic websites or Web applications. It’s an open source & widely used language.
About PHP in Brief
- PHP is an acronym for “PHP: Hypertext Preprocessor”.
- The old name of PHP is Personal Home Page.
- PHP language is written in C.
A brief history of PHP
PHP was conceived sometime in the fall of 1994 by Rasmus Lerdorf. He developed this language for personal use, but at this time it is a widely used language. Developers are using PHP differently from the initial version.
They are using the PHP like framework and CMS versions.
CMS like
- WordPress
- Magento
- Opencart
- Zencart
- Joomla
- Drupal
Frameworks are like
- Laravel
- Codeigniter
- Symphony
- Zend
- CakePHP
- Yii
- Phalcon
- FuelPHP
- Slim
- PHPixie
Advantages of PHP
- Simple – PHP is quite easy to learn and get started.
- Fast – PHP websites typically run very fast.
- Stable – PHP is stable since it has been in existence for a long time.
- Open-source and free – PHP is open source and free. It means that you don’t have to pay a license fee to use PHP to develop software products.
- Community support – PHP has an active online community that helps you whenever you face an issue.
How does PHP scripting work?
In generally PHP work with three different stage
Step-1. The web browser sends an HTTP request to the web server.
Step-2. The PHP preprocessor that locates on the web server processes PHP code to generate the HTML document.
Step-3. The web server sends the HTML document back to the web browser.
In the above processing a PHP script is carried out by the interpreter in four stages:
- lexical analysis (lexing).
- syntax analysis (parsing).
- compilation.
- execution.
If you want more on how the PHP interpreter works then click here