Welcome to the exciting world of the interactive web with PHP. This chapter demonstrates how to create a dynamic development environment with a web server and the PHP engine.
Introducing PHP
Installing the Abyss server
Installing the PHP engine
Integrating Abyss and PHP
Embedding PHP script code
Scripting by the rules
Improving performance
Enabling JIT compilation
Summary
Introducing PHP
The most appealing modern websites provide a customized user experience by dynamically responding to some current conditions ā user name, time of day, latest blog, shopping cart contents, etc. Many of these dynamic websites are created using PHP.
This is the official logo of the PHP project ā the official online home of PHP can be found at php.net
What is PHP?
PHP is a widely-used general purpose scripting language that is especially suited for web development and can be embedded into HTML. It was created by programmer Rasmus Lerdorf, as a set of scripts to maintain his website that he released as āPersonal Home Page Tools (PHP Tools) version 1.0ā on June 8, 1995.
The tools were extended in the version 2 release of 1997, and the name changed to become a recursive acronym āPHP: Hypertext Preprocessorā in version 3 the following year. Performance, reliability and extensibility were improved in 2000 with the release of PHP4, which was powered by the Zend engine virtual machine.
Subsequently, PHP5 was released in 2004 powered by the new Zend II engine and produced as free software by the PHP group. A planned experimental version PHP6, which intended to introduce native Unicode support throughout PHP, was abandoned but PHP7 was released in 2015. PHP8 was released in 2020 and offers āJust In Timeā (JIT) compilation for improved performance. Today, PHP is installed on over 20 million websites and 1 million web servers.
Why is PHP popular?
ā¢PHP is extremely simple for a newcomer, but offers many advanced features for a professional programmer.
ā¢PHP code is enclosed in special start and end processing tags that allow you to jump into and out of āPHP modeā, to implement instructions within an HTML document.
ā¢PHP code is executed on the server (āserver-sideā), unlike JavaScript code that is executed in the browser (āclient-sideā). The client receives the results of running the script without knowing what the underlying code was. Recently, server-side has become known as āThe Cloudā.
This is the āelePHPantā ā the mascot of the PHP project, designed by Vincent Pontier.
Understanding The Cloud
Whenever a user asks to view a web page in their browser, it requests the...