0% found this document useful (0 votes)
26 views1 page

01 Handout 1

PHP is a widely used scripting language suited for web development. PHP code is executed on the server-side and allows developers to collect form data, control user access, and interact with databases like MySQL. PHP can be used to create both static and dynamic web pages efficiently. It is free, cross-platform, and simple to understand, making it a popular choice for web development. Key considerations when choosing a PHP version include security, speed, features, and compatibility with other systems.

Uploaded by

Callie Kkyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

01 Handout 1

PHP is a widely used scripting language suited for web development. PHP code is executed on the server-side and allows developers to collect form data, control user access, and interact with databases like MySQL. PHP can be used to create both static and dynamic web pages efficiently. It is free, cross-platform, and simple to understand, making it a popular choice for web development. Key considerations when choosing a PHP version include security, speed, features, and compatibility with other systems.

Uploaded by

Callie Kkyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

IT2116

Introduction to PHP
What is PHP?
PHP (PHP: Hypertext Preprocessor)
• It is a scripting language that is widely used and an open-source that is suited for web development.
• It extends the services available in HTML considerably, especially when used in conjunction with a database query
language such as MySQL.
• Web pages nowadays are still written in HTML but parts of the HTML are created automatically from PHP insertions
in the HTML code by a special program known as the PHP interpreter.
• PHP scripts are executed on a server.
• PHP files may have HTML, CSS, JavaScript, text, MySQL, and PHP code.
• File extension for PHP files is “.php”
• PHP code structure
<?php
//code here
?>
PHP is used to collect form data, encrypt, control user access, send and receive cookies. On the server-side PHP can create,
open, read, write, delete and close files. The best things about using PHP are that it is extremely simple for a newcomer,
but offers many advanced features for a professional programmer.

Why PHP?
• PHP can be executed on different platforms like Windows, Linux, and Mac OS.
• PHP is free and can run on different web browsers.
• PHP is simple to understand and it supports wide-range databases.
• PHP can create both static and dynamic web pages.
• PHP runs efficiently on the server side.
With PHP, you have the freedom of choosing an operating system and a web server. Furthermore, you also have the choice
of using procedural programming or object-oriented programming (OOP), or a mixture of both. With PHP you are not
limited to output HTML. PHP's abilities include outputting images and PDF files. You can also output easily any text, such as
XHTML and any other XML file. PHP can autogenerate these files, and save them in the file system, instead of printing them
out, forming a server-side cache for your dynamic content.

Server-Side Development
PHP is used strictly in a web server environment. In such an environment, PHP is a CGI/FastCGI or server module called and
controlled by the HTTP Server like Apache and IIS. The HTTP server receives a request for a PHP-based web page and calls
the PHP process to execute it, which usually returns output to the HTTP server to be sent on to the end-user.

There are different versions in PHP that can be used but to avoid issues we need to use the stable version. There are two
(2) stable versions that are available those are PHP 7.4.23 and PHP 8.0.10. When choosing a version to use in server-side
development, there are things to be considered. These are security, speed, features, and compatibility.

REFERENCES:
Aley, R. (2016). PHP beyond the Web. Oxford: Apress Media, LLC.
Bramer, M. (2015). Web Programming with PHP and MySQL: A Practical Guide. New York: Springer International
Publishing.
Connolly, R. & Hoar, R. (2015). Fundamentals of web development. New Jersey: Pearson Education, Inc.
Lemay, L., Colburn, R., & Kyrnin, J. (2016). Sams teach yourself HTML, CSS and JavaScript web publishing in one hour a day,
(7th ed.). New Jersey: Pearson Education, Inc.
Lockhart, J. (2015). Modern PHP. United States of America: O'Reilly Media, Inc.

01 Handout 1 *Property of STI


[email protected] Page 1 of 1

You might also like