SlideShare a Scribd company logo
PHP
G. SASIKUMAR
DEPARTMENT OF COMPUTER SCIENCE
OUTLOOK







INTRODUCTION
USAGE
A SAMPLE
CODE OUTPUT
DATA TYPES
SPEED
OPTIMIZATION
RESOURCES
INTRODUCTION
WHAT IS PHP?

PHP is a scripting langauge that was originally designed for web
developement to produce dynamic webpages

For this purpose, PHP code is embedded into HTML

PHP was created by Rasmus Lerdrof in 1995

PHP originally stood for ”PERSONAL HOME PAGE”
USAGE
PHP is a general-purpose scripting language that is especially
suited to server-side web development where PHP generally
runs on a web server
PHP code in a requested file is executed by the PHP runtime, usually
to create dynamic web page content
PHP is also used for command-line scripting and client-side GUI
applications
PHP can be deployed on most web servers, many operating systems
and platforms, and can be used with many relational database
management systems
A SMALL SAMPLE CODE
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
echo "Hello World";
?>
</body>
OUTPUT
Here the output is ”Hello World”.

PHP only parses code within its delimiters. Anything outside its
delimiters is sent directly to the output and is not processed by
PHP

The most common delimiters are
<?php to open and ?>
<script language="php">
</script>
<?= (which is used to echo back a string or variable) and ?>
<% or <%= and %>.
DATA TYPES

PHP stores whole numbers in a platform-dependent range

This range is typically that of 32-bit signed integers. Unsigned
integers are converted to signed values in certain situations
 Arrays can contain elements of any type that handle in PHP

Including resources, objects, and even other arrays

PHP also supports strings, which can be used with single quotes,
double quotes, or heredoc syntax
SPEED OPTIMIZATION

PHP scripts are stored as human-readable source code and are
compiled on-the-fly to an internal format that can be executed by
the PHP engine

Code optimizers aim to reduce the runtime of the compiled code by
reducing its size and making other changes that can reduce the
execution time with the goal of improving performance
RESOURCES

PHP includes free and open source libraries

PHP is a fundamentally Internet-aware system

Many database servers, embedded SQL libraries such as
embedded PostgreSQL, MySQL and SQLite, LDAP servers, and
others

PHP allows developers to write extensions in C to add functionality
to the PHP language

These can then be compiled into PHP or loaded dynamically at runtime
LOGO OF PHP
p














Usual file extensions .php, .phtml .php5 .phps
Paradigm imperative, object-oriented
Appeared in :1995[1]
Designed by :Rasmus Lerdorf
Developer :The PHP Group
Stable release 5.2.13 / 5.3.2 (5.2.13 February 25, 2010; 37 days ago (2010-02-25) / 5.3.2:
March 4, 2010; 30 days ago (2010-03-04))
Typing discipline Dynamic, weak
Major implementations Zend Engine, Roadsend PHP, Phalanger, Quercus, Project Zero,
HipHop
Influenced by C, Perl, Java, C++, Tcl[1]
Influenced PHP4Delphi
Programming language : C
OS : Cross-platform
License :PHP License
Website :http://www.php.net
A scripting or script language is a programming language that supports scripts:
programs written for a special run-time environment that automate the
execution of tasks that could alternatively be executed one-by-one by a human
operator. Scripting languages are often interpreted (rather than compiled)
A server-side dynamic web page is a web pagewhose construction is
controlled by an application server processing server-side scripts. In server-
side scripting, parameters determine how the assembly of every new web
page proceeds, including the setting up of more client-side processing
"Static" means unchanged or constant, while "dynamic" means changing or
lively. Therefore, static Web pagescontain the same prebuilt content each
time the page is loaded, while the content of dynamic Web pages can be
generated on-the-fly. Standard HTML pages arestatic Web pages
When using the PCRE functions, it is required that the pattern is enclosed
bydelimiters. A delimiter can be any non-alphanumeric, non-backslash, non-
whitespace character. Often used delimiters are forward slashes (/), hash signs
(#) and tildes (~)

More Related Content

What's hot (20)

ODP
Php
Home
 
PDF
Function of PHP in Website Development
EffOne_Technologies
 
PPT
Introduction to PHP Basics
TheCreativedev Blog
 
PPTX
Training ppt
nikita vijay
 
PPT
What is PHP?
audreys9327
 
PPTX
Word press
Brian Lucas
 
PPTX
Unit 1-introduction to scripts
sana mateen
 
PPT
Php unit i
prakashvs7
 
PPT
Tech talk webtech
Shehrevar Davierwala
 
PPTX
Php tutorial
Son Nguyen
 
PPT
Php Ppt
vsnmurthy
 
PPT
Programming language
kalasalingam university
 
PPTX
PHP and Node.js-Differences and Similarities
Cloud Analogy
 
PPSX
Advanced PHP Web Development Tools in 2015
iScripts
 
PPT
Php
Ajay Kumar
 
PDF
Multilingual Drupal presentation from "Do it With Drupal"
Gábor Hojtsy
 
PPTX
PHP ITCS 323
Sleepy Head
 
PPTX
Multi language for php with gettext
Binh Quan Duc
 
PPT
PHP
ARJUN
 
Php
Home
 
Function of PHP in Website Development
EffOne_Technologies
 
Introduction to PHP Basics
TheCreativedev Blog
 
Training ppt
nikita vijay
 
What is PHP?
audreys9327
 
Word press
Brian Lucas
 
Unit 1-introduction to scripts
sana mateen
 
Php unit i
prakashvs7
 
Tech talk webtech
Shehrevar Davierwala
 
Php tutorial
Son Nguyen
 
Php Ppt
vsnmurthy
 
Programming language
kalasalingam university
 
PHP and Node.js-Differences and Similarities
Cloud Analogy
 
Advanced PHP Web Development Tools in 2015
iScripts
 
Multilingual Drupal presentation from "Do it With Drupal"
Gábor Hojtsy
 
PHP ITCS 323
Sleepy Head
 
Multi language for php with gettext
Binh Quan Duc
 
PHP
ARJUN
 

Similar to PHP Basics (20)

PPTX
PHP Hub in Ambala ! Batra Computer Centre
jatin batra
 
PPTX
Introduction to PHP and mysql BSIT SSC project
ChristopherYSabado
 
PPTX
Introduction to PHP.pptx
SherinRappai
 
PDF
Php
Vineet Vats
 
PPTX
Introduction to PHP from Beginning to End
christopherneo4
 
PPTX
Web Application Development using PHP Chapter 1
Mohd Harris Ahmad Jaal
 
PPTX
PHP TRAINING
gurjinderbains
 
PPT
Php hypertext pre-processor
Siddique Ibrahim
 
PDF
Introduction to PHP - Basics of PHP
wahidullah mudaser
 
PDF
t1837
tutorialsruby
 
PDF
t1837
tutorialsruby
 
PPTX
lec1 (1).pptxkeoiwjwoijeoiwjeoijwoeijewoi
PedakotaPavankumar
 
PPTX
Welcome to computer programmer 2
MLG College of Learning, Inc
 
PDF
How PHP works
Atlogys Technical Consulting
 
PPT
a brief introduction to PHP and how to use it.
Raihan Mistry
 
PPT
PHP.ppt
ShishirKantSingh1
 
PPTX
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
DRambabu3
 
PDF
Php introduction
krishnapriya Tadepalli
 
PPTX
Php and it's uses in different tasks ppt
madaanmadhav10
 
PHP Hub in Ambala ! Batra Computer Centre
jatin batra
 
Introduction to PHP and mysql BSIT SSC project
ChristopherYSabado
 
Introduction to PHP.pptx
SherinRappai
 
Introduction to PHP from Beginning to End
christopherneo4
 
Web Application Development using PHP Chapter 1
Mohd Harris Ahmad Jaal
 
PHP TRAINING
gurjinderbains
 
Php hypertext pre-processor
Siddique Ibrahim
 
Introduction to PHP - Basics of PHP
wahidullah mudaser
 
lec1 (1).pptxkeoiwjwoijeoiwjeoijwoeijewoi
PedakotaPavankumar
 
Welcome to computer programmer 2
MLG College of Learning, Inc
 
a brief introduction to PHP and how to use it.
Raihan Mistry
 
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
DRambabu3
 
Php introduction
krishnapriya Tadepalli
 
Php and it's uses in different tasks ppt
madaanmadhav10
 
Ad

Recently uploaded (20)

PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PDF
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PPTX
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
Ad

PHP Basics

  • 3. INTRODUCTION WHAT IS PHP?  PHP is a scripting langauge that was originally designed for web developement to produce dynamic webpages  For this purpose, PHP code is embedded into HTML  PHP was created by Rasmus Lerdrof in 1995  PHP originally stood for ”PERSONAL HOME PAGE”
  • 4. USAGE PHP is a general-purpose scripting language that is especially suited to server-side web development where PHP generally runs on a web server PHP code in a requested file is executed by the PHP runtime, usually to create dynamic web page content PHP is also used for command-line scripting and client-side GUI applications PHP can be deployed on most web servers, many operating systems and platforms, and can be used with many relational database management systems
  • 5. A SMALL SAMPLE CODE <html> <head> <title>PHP Test</title> </head> <body> <?php echo "Hello World"; ?> </body>
  • 6. OUTPUT Here the output is ”Hello World”.  PHP only parses code within its delimiters. Anything outside its delimiters is sent directly to the output and is not processed by PHP  The most common delimiters are <?php to open and ?> <script language="php"> </script> <?= (which is used to echo back a string or variable) and ?> <% or <%= and %>.
  • 7. DATA TYPES  PHP stores whole numbers in a platform-dependent range  This range is typically that of 32-bit signed integers. Unsigned integers are converted to signed values in certain situations  Arrays can contain elements of any type that handle in PHP  Including resources, objects, and even other arrays  PHP also supports strings, which can be used with single quotes, double quotes, or heredoc syntax
  • 8. SPEED OPTIMIZATION  PHP scripts are stored as human-readable source code and are compiled on-the-fly to an internal format that can be executed by the PHP engine  Code optimizers aim to reduce the runtime of the compiled code by reducing its size and making other changes that can reduce the execution time with the goal of improving performance
  • 9. RESOURCES  PHP includes free and open source libraries  PHP is a fundamentally Internet-aware system  Many database servers, embedded SQL libraries such as embedded PostgreSQL, MySQL and SQLite, LDAP servers, and others  PHP allows developers to write extensions in C to add functionality to the PHP language  These can then be compiled into PHP or loaded dynamically at runtime
  • 11.               Usual file extensions .php, .phtml .php5 .phps Paradigm imperative, object-oriented Appeared in :1995[1] Designed by :Rasmus Lerdorf Developer :The PHP Group Stable release 5.2.13 / 5.3.2 (5.2.13 February 25, 2010; 37 days ago (2010-02-25) / 5.3.2: March 4, 2010; 30 days ago (2010-03-04)) Typing discipline Dynamic, weak Major implementations Zend Engine, Roadsend PHP, Phalanger, Quercus, Project Zero, HipHop Influenced by C, Perl, Java, C++, Tcl[1] Influenced PHP4Delphi Programming language : C OS : Cross-platform License :PHP License Website :http://www.php.net
  • 12. A scripting or script language is a programming language that supports scripts: programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled) A server-side dynamic web page is a web pagewhose construction is controlled by an application server processing server-side scripts. In server- side scripting, parameters determine how the assembly of every new web page proceeds, including the setting up of more client-side processing "Static" means unchanged or constant, while "dynamic" means changing or lively. Therefore, static Web pagescontain the same prebuilt content each time the page is loaded, while the content of dynamic Web pages can be generated on-the-fly. Standard HTML pages arestatic Web pages
  • 13. When using the PCRE functions, it is required that the pattern is enclosed bydelimiters. A delimiter can be any non-alphanumeric, non-backslash, non- whitespace character. Often used delimiters are forward slashes (/), hash signs (#) and tildes (~)