Unit-4 PHP
Unit-4 PHP
PHP
What is PHP?
• Server-side scripting language.
• PHP stands for "PHP Hypertext Preprocessor“
• PHP is a widely-used, open source.
• PHP scripts are executed on the server
• Used to make web pages dynamic:
• interface with other services: database, e-mail, etc
• PHP code can be embedded in HTML5 code
PHP history
• Created in 1994 by Rasmus Lerdorf,
• Originally called “Personal Home Page” language.
• He did not intend PHP to be come a new programming
language.
• He open sourced it and it grew on its own.
• Graduated University of Waterloo in Applied Science in
System Engineering
Features of PHP
• Simplicity
• Clearly written manual
• Consistent and logical syntax
• It may take only two hours.
• It has Kiss principle for (Keep it simple stupid).
•Portability
•work on different platforms
•Speed
•run faster that most scripting languages
Features of PHP
• Open source
• its source code is freely available on the web
•Extensible
•it can support new technology and add new methods
PHP Basic Syntax
• A PHP script can be placed anywhere in the document.
• A PHP script starts with
<?php and ends with ?>:
XAMPP SERVER
• XAMPP is an open-source web server solution package. It is mainly
used for web application testing on a local host webserver.
• XAMPP stands for:
• X = Cross-platform
• A = Apache Server
• M = MariaDB
• P = PHP
• P = Perl
Why Do You Need XAMPP?
• To run any PHP program, you will need Apache or MYSQL databases,
both supported by XAMPP.