0% found this document useful (0 votes)
5 views

A_Review_on_PHP_Programming_Language

Php review

Uploaded by

manhn031103
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

A_Review_on_PHP_Programming_Language

Php review

Uploaded by

manhn031103
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/371166635

A Review on PHP Programming Language

Article · May 2023

CITATION READS

1 5,307

3 authors, including:

Darllaine Lincopinis
Western Mindanao State University
14 PUBLICATIONS 3 CITATIONS

SEE PROFILE

All content following this page was uploaded by Darllaine Lincopinis on 31 May 2023.

The user has requested enhancement of the downloaded file.


Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language 1

A Review on PHP Programming Language

Christian Paul W. Apiag


(Western Mindanao State University, Pagadian City, Philippines
qb202102331@wmsu.edu.ph)

Eugine Bryan S. Cadiz


(Western Mindanao State University, Pagadian City, Philippines
qb202103667@wmsu.edu.ph)

Darllaine R. Lincopinis
(Western Mindanao State University, Pagadian City, Philippines
https://orcid.org/0000-0001-9503-8965, lincopinis.darllaine@wmsu.edu.ph)

Abstract: PHP is a scripting language that runs on servers and is frequently used for creating
websites. It was developed by Rasmus Lerdorf in the middle of the 1990s and has since grown
to be one of the most well-liked programming languages for creating dynamic web applications.
PHP is available to developers of all experience levels because it is open-source and cost-free
to use. PHP can be directly inserted into HTML code, making it especially well-suited for web
development. Additionally, PHP supports a large number of databases, such as MySQL, Oracle,
and PostgreSQL, making it a potent tool for creating intricate web applications. This paper contains
an introduction to the PHP programming language, what PHP means, what PHP is used for, who
uses it, its advantages and disadvantages, its basic syntax, and why it is popular compared to other
languages. Some other features are included in this paper to help you easily understand the PHP
programming language. This includes ten reasons to learn PHP and the various applications of
PHP programming.
Keywords: C++, Object-oriented, Cross-platform, Abstraction, Inheritance, Polymorphism, Stan-
dard Template Library (STL), High Flexibility, Scalability, and Low-level Manipulation

1 Introduction
PHP is a popular language for web development due to its ease of use and versatility.
As noted by [Trachtenberg Sklar,2021], PHP was designed specifically for building
dynamic web pages and has since become a widely used language for web development.
It was first released in 1995 by Rasmus Lerdorf, and since then, it has continued to
evolve and improve. One of the key benefits of PHP is its flexibility. As an open-source
language, PHP has a large and active community of developers who contribute to its
development and create useful tools and libraries for it. According to [Sebesta, 2002],
PHP is designed to be easy to learn and use, making it an ideal choice for both new
and experienced developers. PHP is also known for its compatibility with other web
development tools, such as HTML, CSS, and JavaScript. This means that developers can
easily integrate PHP code with other web technologies to create powerful and dynamic
web applications. PHP is often used in conjunction with other web development tools to
create complex web applications. One of the strengths of PHP is its support for databases
[Toal,2022]. PHP has built-in support for many popular database systems such as MySQL,
PostgreSQL, and SQLite, making it an ideal language for building content management
systems (CMS) and e-commerce platforms. PHP’s database support is one of its key
2 Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language

features, allowing developers to easily interact with databases and create powerful web
applications.
In recent years, PHP has continued to evolve and improve, with the release of version
8 in November 2020. This latest version includes many new features and improvements,
such as improved performance, a new JIT (Just-In-Time) compiler, and new syntax
enhancements. Overall, PHP is a powerful and flexible programming language that has
played a key role in web development for many years. Its ease of use, versatility, and
compatibility with other web technologies make it an ideal choice for developers looking
to build dynamic and powerful web applications [Toal,2022].

1.1 What does the term PHP mean?


According to the official PHP documentation on php.net (n.d.), PHP stands for ”PHP:
Hypertext Preprocessor”. It is a recursive acronym, which means that the first ”P” in
”PHP” stands for ”PHP” itself. The name reflects the primary use of the language as a
tool for processing hypertext, which refers to the markup language used to create web
pages. PHP was originally created as a set of Common Gateway Interface (CGI) scripts
to process web forms and generate dynamic content for websites, but has since evolved
into a general-purpose programming language used for a wide range of tasks beyond
web development [Chris,2021].

1.2 What is PHP used for?


PHP is primarily used for server-side web development, where it is used to create dynamic
web pages and web applications. It is a versatile language that can be used for a wide
range of tasks. Here are some examples of what PHP is used for:

1. Server-side Scripting
Server-side Script is PHP’s main strength. If you are just learning to code and want
to explore server-side scripting, PHP is a great language to learn. To get cracking
with PHP server-side scripting you’ll need to have a PHP parser, web server and web
browser. This means that PHP code runs on the server-side before being sent to the
client’s browser as HTML. This allows for dynamic web pages, such as displaying
content based on user input or retrieving data from a database. The PHP Group states
that this feature of PHP makes it a great choice for web development as it provides
powerful tools for creating dynamic and interactive websites.
2. Creating Dynamic Websites
PHP is commonly used to generate dynamic content on web pages by interacting
with databases, file systems, and other web-based services. This means that the
content of a web page can change dynamically based on various factors, such as
user input, time of day, and data stored in a database.
3. Building Web Applications
PHP can be used to build web-based applications, such as content management
systems, e-commerce platforms, and social networking sites. With the use of frame-
works such as Laravel, Symfony, and CodeIgniter, developers can easily build
scalable and robust web applications.
Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language 3

4. Processing and manipulating data


PHP offers powerful tools for processing and manipulating data, such as parsing and
generating XML documents, creating PDFs, and working with images.
5. Command-line Scripting
PHP can be used to create command-line scripts for automating tasks, such as
data processing and file management [PHP manual, n.d.].This allows developers to
build powerful automation tools that can help them save time and streamline their
development process.
6. Developing APIs
PHP can be used to create APIs (Application Programming Interfaces) that allow
web-based applications to communicate with each other [W3schools, n.d.]. This
means that developers can build web applications that can consume data and services
from other web applications, making it easier to integrate different web applications.

1.3 Who uses PHP?


According to the article by Koen Vlaswinkel on Codementor, PHP is widely used by
many companies and organizations for web development. Some of the well-known
companies that use PHP include Facebook, Wikipedia, Yahoo, Tumblr, and WordPress.

1. Facebook
Over 22 billion times a month, Facebook is accessed, according to Similarweb.
Since its creation in 2004, Facebook has benefited from PHP’s capacity to produce
dynamic content in a matter of seconds. By design, Zuckerberg and Moskowitz
wrote all of the PHP code for the core Facebook application. This had a snowball
effect, and now PHP is being used by numerous modern technology firms. In 2010,
Facebook released HipHop for PHP (HPHPc), a transpiler or compiler that converts
source code into source code for another language. HipHop for PHP translates the
injected PHP code into C++ before compiling it into an executable binary file.
2. Wikipedia
It is one of the biggest online sources of knowledge for all subjects, big and small.
The website provides a wealth of data that has been donated by individual volunteers.
In order to swiftly display material on web pages, the platform also makes use of PHP
as its main server-side language. The Wikipedia Foundation stated on their official
Wikimedia server page that ”Our main web application is MediaWiki, which is
written in PHP (70%) and JavaScript (30%)”. Later in 2014, Wikipedia also switched
to HHVM to improve performance by translating PHP code in other languages for
faster execution.
3. Yahoo
Yahoo started as a PHP-only site, which powered its Mail, Answers, and News
segments. To compete with rival Google, the company made the move to a mixed
programming language framework, but it was PHP that gave Yahoo its strong
start in the market. While transitions to other code types are ongoing, PHP helped
Yahoo develop strong account security, user-friendly templates, and reliable policy
frameworks.
4 Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language

4. Tumblr
Tumblr is a blogging and social networking site that brings people together who
share common interests from all over the world. On this blogging platform, you
can get templates, mobile apps, social networking features, and photos all for free.
Developers use the latest version of PHP as the major server-side language on this
platform.
5. WordPress
WordPress is a content management system that allows anyone to create a free
website or blog quickly and effortlessly. Since WordPress is a web-based service,
PHP web application development is used to get data from the database and turn it
into an HTML web page.

2 Basic Syntax of PHP


We can insert PHP script or code anywhere in the document. A PHP script or code starts
with <?php and ends with ?>: Here are some common and simple language construct in
PHP:
– echo - used to output one or more strings to the browser or console.
<? php
echo ” H e l l o W o r l d ! ” ;
?>

– print - used to output a single expression to the browser or console.


<? php
print ” HelloWorld ! ” ;
?>

– if - used for conditional statements.


<? php
$num = 1 0 ;
i f ( $num > 0 ) {
echo ” $num�i s�p o s i t i v e . ” ;
}

# O u t p u t : 10 i s p o s i t i v e .
?>

– for - used for looping through code a specified number of times.


<? php
f o r ( $ i = 1 ; $ i <=5; $ i ++){
echo ” $ i�” ;
}

# Output : 1 2 3 4 5
?>
Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language 5

3 Why PHP is Popular Compared to other Programming Lan-


guages?
PHP is popular because it is free, open-source, and has a large and active community of
developers contributing to its development. It is easy to learn, use, and deploy, making it
a great choice for beginners and experienced developers alike. PHP’s popularity can also
be attributed to its open-source nature, which makes it easily accessible to developers
who can use it to create web applications without incurring significant licensing fees.
As a result, PHP has a large and active community of developers who contribute to
its growth and development. Moreover, PHP offers a high level of compatibility with
various platforms and operating systems, making it versatile and easy to use across
different environments. This compatibility is due to its ability to integrate with other
languages such as HTML, CSS, and JavaScript, further expanding its functionalities.
Additionally, PHP has a low learning curve, allowing beginners to quickly grasp the
basics of the language and start building web applications. Its syntax is simple and easy
to understand, and a vast number of online resources are available to assist with learning
and development. Finally, PHP has an extensive set of pre-built functions and libraries,
which significantly reduces development time and effort. These functions and libraries
make it possible to implement complex functionalities in a short amount of time.

4 Features of PHP Programming Language


Each of its programming languages has its own unique features and abilities, but for PHP,
some notable features include its open-source nature, which allows for easy accessibility
to developers, and a large and active community contributing to its development. Addi-
tionally, PHP offers high compatibility with various platforms and operating systems,
making it versatile and easy to use across different environments. Its simple syntax and
low learning curve also make it a great choice for beginners. Finally, the extensive set of
pre-built functions and libraries makes it possible to implement complex functionalities
in a short amount of time. In this section, we are going to discuss some features of the
PHP programming language. Now that we have a basic understanding of PHP, let us see
some of the most striking features of PHP.

1. Easy to learn
PHP is one of the most user-friendly programming languages out there. This is due
to the fact that, despite its severe grammar, it is nevertheless forgiving. In addition
to this obvious advantage, you may use a variety of tools and resources to make
sure your code is streamlined for speed and effectiveness. PHP is a relatively easy
language to learn compared to other programming languages. Its syntax is similar to
C, which makes it easier for developers to learn if they have prior experience with C
or other C-based languages..
2. Open Source
PHP is an open-source language because it was designed to be freely available
and distributed under the PHP License [W3Schools, n.d.]. PHP is an open-source
server-side scripting language that is used to develop static or dynamic websites
or web applications.” The open-source nature of PHP allows anyone to use, mod-
ify, and distribute the language as they see fit, without the need for permission or
payment. This has contributed to the widespread popularity of PHP as well as the
6 Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language

large community of developers and contributors who support its development and
improvement.
3. Server-side scripting
As a server-side scripting language, PHP allows developers to write code that is
executed on the server side, rather than the client-side, where the browser resides.
This means that PHP code is processed on the server before it is sent to the client’s
browser as HTML. The server generates the HTML output and sends it back to the
client, which then renders the page in the browser. PHP is a server-side scripting
language, which means that it runs on the server before the output is sent to the
client’s browser. This makes it easier to create dynamic web pages, process forms,
and interact with databases.
4. Cross-Platform
PHP can run on various operating systems like Windows, Linux, Unix, and macOS,
making it a cross-platform language. This allows developers to create applications
that can run on different types of servers and operating systems. Additionally, PHP
is compatible with most web servers, such as Apache and Nginx, making it easier to
deploy applications.
5. Database Integration
PHP is a server-side scripting language, which means that it runs on the server before
the output is sent to the client’s browser. This makes it easier to create dynamic web
pages, process forms, and interact with databases. Since the code runs on the server,
the client cannot view or modify the code, which improves security. This allows
developers to create applications that interact with databases, store and retrieve data,
and perform operations like creating tables, adding data, and modifying data.
6. Object-oriented Programming
PHP supports object-oriented programming (OOP), which makes it easier to write
reusable and maintainable code. OOP allows developers to organize code into classes,
objects, and methods, making it easier to manage large and complex applications.
Additionally, OOP concepts like inheritance and polymorphism can be used to reduce
code duplication and improve code readability.
7. Large Community
PHP has a large and active community of developers, which means that developers
can easily find help, resources, and support when needed. Despite being an old
language, PHP still comprises 79.8% of all web applications that nearly translates to
20 million websites and 2 million web servers. According to zdnet.com, the demand
for PHP developers has also massively increased to 834% since January 2020.
8. Speed
Millions of people use the internet nowadays, and each second they use the web
servers to request something. The need for speed is especially important for vital web
applications like banking, security, and government ones. Therefore, the servers’
processing speed and programming language must be extremely high. PHP became
three times faster after version 7.x was released. Below is a comparison between
PHP and different back-end programming languages. PHP scripts are typically faster
than scripts written in other languages. Users like the quicker loading of their web
sites. Because PHP runs in its own memory area, it executes more quickly than most
Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language 7

other programming languages. Additionally, it has quick and effective connectivity


to databases.
9. Extensibility
PHP can be extended with third-party libraries and extensions, which can add more
functionality to the language. This allows developers to leverage existing code and
avoid reinventing the wheel. Additionally, PHP can be integrated with other technolo-
gies like HTML, CSS, and JavaScript, making it more versatile. The large number
of third-party libraries and extensions available for PHP means that developers can
find solutions to common problems quickly and efficiently.
10. Security
PHP has many pre-defined functions for data encryption. Users can also use third-
party applications for security. Security and flexibility are often contrasting features,
but PHP somehow manages to offer them both, and that’s great. PHP is designed
specifically to be a more secure language for writing CGI (Computer-generated
Imagery) programs. Security algorithms such as Sha1 ( secure Hash algorithm 1)
and MD5(Message digest 5) are used to encrypt the strings in PHP. Filter_var and
strip_tags functions help to keep the environment more secure and safe for users.

5 10 Reasons to Learn PHP Programming Language


Learning PHP can be beneficial for various reasons. First, as mentioned earlier, PHP is a
widely used language, making it a valuable skill to have in the job market. Second, it is
relatively easy to learn and use, especially for beginners who are just starting with web
development. Third, PHP has a large and supportive community that provides resources,
documentation, and support for developers. Fourth, PHP is an open-source language,
which means that it is free to use and can be customized according to the developer’s
needs. Finally, PHP has a vast library of pre-built functions and frameworks, which can
significantly speed up the development process and reduce coding time. So here are
some reasons to learn PHP programming languages:

1. Wide range application


PHP is widely used across various industries and sectors. It is estimated that al-
most 80% of all websites use PHP as their server-side language. PHP is also com-
monly used for developing web applications, content management systems (CMS),
e-commerce websites, social networking platforms, and more. In addition, PHP is
used by companies of all sizes, from small businesses to large corporations. Therefore,
learning PHP can open up many career opportunities for developers.
2. Easy to learn
One of the main reasons PHP became so commonplace is that it is relatively simple
to get started with. Even without extensive knowledge or experience in web devel-
opment, most people could create a web page with a single PHP file in a relatively
short period of time. The syntax is simple, and command functions are easy to learn,
meaning the barriers to entry with PHP are lower than with many other languages.
3. PHP is open source and free
PHP is an open-source programming language. This means it’s free. There are no
8 Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language

open or hidden license fees, so it makes it very useful for popular content manage-
ment systems (CMS), like Wordpress. Since it is open-source, it’s available for all
developers, especially the new ones who will develop and carry PHP into the future.
Also, it is cheaper and easier for them to create a website using PHP.
4. Performance
The performance of PHP has improved significantly over the years. With the release
of PHP 7, the performance of PHP has increased significantly, making it a much
faster language compared to earlier versions. PHP 7 has improved memory usage and
reduced CPU time, resulting in faster execution times. Additionally, PHP has a large
number of built-in functions and extensions that allow developers to optimize their
code and improve performance. Overall, PHP is a performance language suitable
for building scalable and high-performance web applications.
5. Flexibility
PHP is a flexible language that allows developers to create web applications that can
be easily modified and extended. This flexibility comes from the fact that PHP is an
open-source language, meaning that developers can modify the language to suit their
specific needs. Additionally, PHP has a large and active community that creates and
maintains a wide range of libraries, frameworks, and tools, further increasing its
flexibility. As a result, PHP can be used to create a variety of web applications, from
small personal websites to large-scale enterprise applications .
6. PHP has a standard library
PHP is a powerful backend language used in more than 80% of the global web
applications. The simplicity of PHP makes it one of the top programming languages,
as it uses an easy-to-understand programming structure and developer-friendly web
functionalities. Yes, like every other Language PHP uses libraries. PHP Libraries
are collections of prewritten code that users can use to optimize tasks. The Standard
PHP Library (SPL) is a collection of interfaces and classes that are meant to solve
common problems.
7. PHP has well design frameworks
PHP has well-designed frameworks. Some of the popular PHP frameworks include
Laravel, Symfony, CodeIgniter, and Yii, among others. These frameworks offer
developers a wide range of tools and features to help them build robust and scal-
able web applications quickly and efficiently. According to a survey conducted by
SitePoint in 2020, Laravel is the most popular PHP framework, with over 61% of
developers choosing it as their preferred framework. Symfony and CodeIgniter were
also popular, with over 14% and 11% of developers using them, respectively.
– Laravel
is a free and open-source PHP web framework, created by Taylor Otwell and in-
tended for the development of web applications following the model–view–con-
troller architectural pattern and based on Symfony.
– Symfony
is a free and open-source PHP web application framework and a set of reusable
PHP component libraries. It was published as free software on October 18, 2005,
and released under the MIT license.
Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language 9

– CodeIgniter
is an open-source software rapid development web framework, for use in building
dynamic web sites with PHP.
– Yii
is an open source, object-oriented, component-based MVC PHP web application
framework. Yii is pronounced as ”Yee” or [ji:] and in Chinese it means ”simple
and evolutionary” and it can be an acronym for ”Yes It Is!”.
8. Compatibility
PHP is compatible with a wide range of web servers and platforms, including Apache,
Nginx, and Microsoft IIS. This makes it easy to deploy PHP applications to different
environments and to integrate with other technologies.
9. Efficient
PHP is known to be an efficient language, especially with the release of PHP 7. With
improvements in memory usage and CPU time reduction, PHP 7 provides faster
execution times compared to earlier versions. Additionally, PHP has a large number
of built-in functions and extensions that allow developers to optimize their code and
improve performance. Overall, PHP is a performant language suitable for building
scalable and high-performance web applications.
10. Platform Independent
Being platform-independent is another crucial benefit of PHP. PHP is a platform-
independent language. It can be used on various operating systems such as Windows,
Linux, Unix, and macOS, which helps save time, effort and cost. This allows devel-
opers to create applications on one operating system and deploy them on another
without much modification. PHP is also compatible with various web servers, making
it a flexible language to work with.

6 Conclusion
PHP is a versatile and powerful scripting language that has gained tremendous popularity
over the years. It is widely used for developing dynamic web pages, web applications,
and content management systems. One of the reasons why PHP is so popular is because
it is an open-source language, which means that it is free to use, modify, and distribute.
PHP’s simplicity and ease of use make it an ideal choice for beginners who are just
starting with programming. It has a straightforward syntax, which means that you can
write code quickly and easily. Additionally, PHP is compatible with most operating
systems and web servers, which means that it can be used on almost any platform. In
conclusion, PHP is a versatile and reliable scripting language that has become a go-to
choice for web developers all over the world. Its open-source nature, ease of use, and
extensive library of functions and modules make it an ideal choice for building dynamic
and complex web applications. Whether you are a beginner or an experienced developer,
PHP has something to offer everyone.

References
[Toal,2022] Toal, R. What is PHP?. (2022), https://codeinstitute.net/global/blog/what-is-php-
programming/
10 Apiag, C., Cadiz, E., Lincopinis, D.: A Review on PHP Programming Language

[Chris,2021] Chris, K. What is PHP? The PHP Programming Language Meaning Explained.
(2021), https://www.freecodecamp.org/news/what-is-php-the-php-programming-language-
meaning-explained/
[Trachtenberg Sklar,2021] Trachtenberg, A. & Sklar, D. Scaling PHP Applications. (2021),
https://www.oreilly.com/library/view/php-cookbook-2nd/
[Sebesta, 2002] Sebesta, R. Programming the world wide web. (Addison-Wesley Longman Pub-
lishing Co., Inc.,2002)

View publication stats

You might also like