You are on page 1of 16

PHP Introduction

Session Number & Date : 1 ( 07-12-2020 )


Session Description : Introduction to PHP
Prepared by : Dr. Rama , Scientist ‘E’
Software Development Unit, Pune

1
What is PHP?
● PHP is a general Purpose scripting Language.
● Full form of PHP is Recursive acronym i.e. Hypertext
Preprocessor.

● server side programming.

● PHP commands are processed by an interpreter so


program execution is fast and simple.

● It also can be implemented as a module, a daemon or as


a common gateway interface (CGI) executable.

2
What is PHP?
● PHP code will give results in the form of HTML, JSON,
XML or binary data in the form of Image or Audio,
video formats.

● PHP code will be embedded in HTML code and


executed on the server the result of the interpreted and
executed code are traverse back to the browser which
would form the whole or part of an HTTP response.

● PHP code can also be interpreted and executed via


Command line interface (CLI).

● Open Source Project

● Platform compatibility
3
PHP History

● Created by Danish-Canadian programmer Rasmus


Lerdorf in 1994.
● Suraski and Gutmans had re written PHP's core by
producing the Zend Engine in 1999.
● PHP 5 onwards more features are included like
improved support for object-oriented programming, a
lightweight and consistent interface for accessing
databases by PHP Data Objects (PDO) extension.
Unicode was implemented in PHP 7.
● Latest version of PHP was PHP 8

4
Why PHP Popular?

●Simplicity

●Compatibility

● Zero Cost

●Savviest System

●Comfortable to work with Content Management

Systems

5
Why PHP Popular?


Versatile

●Flexible, measurable and effective

●Extensions and other add-ons

● Large Community/Libraries

6
Basic Language Constructs

Example 1 : Helloworld.php

<?php
echo '<p>Hello, World!</p>';
?>

CS380 7
Basic Language Constructs
<!DOCTYPE html>
<html>
<head>
<title>PHP "Hello, World!" program</title>
</head>
<body>
<?php
echo '<p>Hello, World!</p>';
?>
</body>
</html>
CS380 8
Licencing

⚫ PHP is free software released under the PHP License.

⚫ The products developed from this software needed not get


any written permissions.

CS380 9
Development and Community
Php.net is the best PHP repository and web site to get online
manual and resources documentations and new releases. Developer
can get the solutions to their problems in this site.

Various free PHP forums available to learn improve and share the
PHP development:
● CodeProject
● CodeGuru
● Dream In Code
● Designers Talk
● Programming Forums

CS380 10
A List of PHP editors
Editor Available on Platforms GUI builder Debugger

Aptana Studio Unix Plus, Windows, Mac Os Visual JS editor

Ecilipse PDT Unix Plus, Windows, Mac Os Yes Xdebug

Gedit Unix Plus, Windows, Mac Os Yes xdebug

Netbeans Unix Plus, Windows, Mac Os Yes xdebug

Notepad++ Windows No Xdebug

Visual Studio Code Visual Studio Code No No

VIM Unix Plus, Windows, Mac Os No No

Codelite Unix Plus, Windows, Mac Os No No

CS380 11
PHP Frameworks
To promote rapid application development,
PHP can be developed using many frameworks
which provide building blocks like CakePHP,
Symphony, Codeigniter, Drupal, Laravel ,
Joomla and Zend Framework etc.

CS380 12
Interesting Facts
⚫ Top 10 famous websites which are originally
developed in PHP
◦ Facebook.
◦ Yahoo
◦ Wikipedia
◦ WordPress
◦ Tumblr
◦ MailChimp
◦ Flickr
◦ Digg
CS380 13
PHP Installation
⚫ PHP can be installed on various platforms and works on
various operating systems.
⚫ PHP installation on Linux and windows
⚫ Linux
Apache Server Installation
PostgresSql Installation
PHP server Installation
⚫ Windows
IIS Server Installation
PostgresSql Installation
PHP server Installation
CS380 14
PHP Installation
⚫ PHP can be installed on various platforms and works on
various operating systems.
⚫ The below are some of the available PHP bundles.
⚫ The first letter standing for the respective operating system,
PHP is commonly used as the P in this bundle
◦ LAMP architecture for Linux, Apache, MySQL and PHP
◦ WAMP for Windows, Apache, MySQL and PHP
◦ XAMPP for Linux, Solaris, Windows, and Mac OS X,
Apache web server, MySQL, PHP, Perl, a FTP server and
phpMyAdmin.
◦ MAMP for macOS, Apache, MySQL and PHP

CS380 15
PHP Installation
⚫ PHP can be installed on various platforms and works on
various operating systems.
⚫ The below are some of the available PHP bundles.
⚫ The first letter standing for the respective operating system,
PHP is commonly used as the P in this bundle
◦ LAMP architecture for Linux, Apache, MySQL and PHP
◦ WAMP for Windows, Apache, MySQL and PHP
◦ XAMPP for Linux, Solaris, Windows, and Mac OS X,
Apache web server, MySQL, PHP, Perl, a FTP server and
phpMyAdmin.
◦ MAMP for macOS, Apache, MySQL and PHP

CS380 16

You might also like