PHP Modules Tutorials - Herong's Tutorial Examples
∟Introduction and Installation of PHP
∟What Is PHP
This section describes what is PHP language and what are main features supported in PHP.
What Is PHP?
PHP stands for PHP: Hypertext Preprocessor, a recursive acronym.
It is mainly a Web server side scripting language.
But it can also be used for other purposes.
PHP was originally created by Rasmus Lerdorf in 1995
as a simple Web page generation tool named
as PHP/FI (Personal Home Page/Forms Interpreter).
Today it becomes the number one of server side scripting languages.
Here are top 10 scripting languages used by Websites compiled
by w3techs.com in 2024:
Language Percentage
---------- ----------
PHP 76.1%
ASP.NET 5.9%
Ruby 5.9%
Java 4.9%
JavaScript 3.5%
Scala 3.2%
Python 1.3%
ColdFusion 0.2%
Perl 0.1%
Erlang 0.1%
Main features of PHP:
- Web application features - PHP support most commonly used Web application features like: HTTP Cookie,
Session, File Upload, etc.
- CLI (Command-Line Interface)- PHP is commonly used to write Web applications to be integrated to Web servers
using the Common Gateway Interface (CGI). But PHP can also be used to write standalone applications
to be executed by the CLI (Command-Line Interface).
- Data types - PHP supports many data types like other programming languages:
signed and unsigned integers, floating numbers, strings, resources, null, etc.
- File I/O - PHP supports most commonly used file I/O features like local file and path management, remote resource
access using Internet protocols like HTTP and FTP.
- Safe mode - PHP supports a safe mode with many built-in functions restricted or disabled.
- Pre-compilation - PHP Web applications are usually deployed in source code, which will be
interpreted on-the-fly when Web requests arrive to the server. But PHP Web applications can also be
pre-compiled and deployed in executable format to speed up Web requests response time.
- Object-oriented programming - PHP supports object-oriented programming features like object references,
private and protected member variables and methods, abstract and final classes and methods, constructors and destructors,
interfaces, etc.
- Built-in modules - The standard PHP build comes with many free and open source libraries included as built-in modules
for calendar dates handling, FTP protocol support, XML processing, encryption and decryption,
ODBC support, ZIP support, regular expression support, etc.
- Extensions - A large collection of PHP extensions are available to add functionalities to the standard PHP build.
Examples of PHP extensions are Windows API, process management on Unix OS, multibyte string support,
cURL (client-side URL transfer), image manipulation, data compression, database access, Web service, etc.
PHP major releases:
8.0 26 November 2020
7.0 3 December 2015
6.x Not released
5.6 28 August 2014
5.4 1 March 2012
5.3 30 June 2009
5.0 13 July 2004
4.0 22 May 2000
3.0 6 June 1998
2.0 1 November 1997
1.0 8 June 1995
Table of Contents
About This Book
►Introduction and Installation of PHP
►What Is PHP
Downloading and Installing PHP 7.3 for Windows
"php -help" - Command Line Options
"php -m" - Built-in Modules
"php -i" - PHP Engine Information
php.ini - PHP Runtime Configuration
Hello.php - My First PHP Script
"php -a" - PHP Interactive Shell
Downloading and Installing PHP Documentation
Managing PHP Engine and Modules on macOS
Managing PHP Engine and Modules on CentOS
cURL Module - Client for URL
DOM Module - Parsing HTML Documents
GD Module - Manipulating Images and Pictures
MySQLi Module - Accessing MySQL Server
OpenSSL Module - Cryptography and SSL/TLS Toolkit
PCRE Module - Perl Compatible Regular Expressions
SOAP Module - Creating and Calling Web Services
SOAP Module - Server Functions and Examples
Zip Module - Managing ZIP Archive Files
References
Full Version in PDF/EPUB