SlideShare a Scribd company logo
BY ANCY RAJU
Venture software technologies
 PHP is an acronym for "PHP Hypertext
Preprocessor"
 PHP is a widely-used, open source
scripting language
 PHP scripts are executed on the server
 PHP costs nothing, it is free to download
and use
 PHP files can contain text, HTML, CSS,
JavaScript, and PHP code
 PHP code are executed on the server, and
the result is returned to the browser as plain
HTML
 PHP files have extension ".php"
 PHP can generate dynamic page content
 PHP can create, open, read, write, and
close files on the server
 PHP can collect form data
 PHP can send and receive cookies
 PHP can add, delete, modify data in your
database
 PHP can restrict users to access some
pages on your website
 PHP can encrypt data
 With PHP you are not limited to output
HTML.
 We can output images, PDF files, and even
Flash movies.
 We can also output any text, such as
XHTML and XML.
 PHP runs on various platforms (Windows,
Linux, Unix, Mac OS X, etc.)
 PHP is compatible with almost all servers
used today (Apache, IIS, etc.)
 PHP supports a wide range of databases
 PHP is free. Download it from the official
PHP resource: www.php.net
 PHP is easy to learn and runs efficiently on
the server side
You must:
 install a web server
 install PHP
 install a database, such as MySQL
<?php
PHP code goes here
?>
PROGRAM
<?php
echo "<h2>PHP is fun!</h2>”;
echo "Hello world!<br>";
echo "I'm about to learn PHP!<br>";
echo "This", " string", " was", " made",
"with multiple parameters.";
?>
OUTPUT
PHP is fun!
Hello world!
I'm about to learn PHP!
This string was made with multiple parameters.
 A comment in PHP code is a line that is not
read/executed as part of the program.
 Its only purpose is to be read by someone
who is editing the code!
 PHP supports three ways of commenting:
<!DOCTYPE html>
<html>
<body>
<?php
// This is a single line comment
# This is also a single line comment
/* This is a multiple lines comment block that spans
over more than one line */
?>
</body>
</html>
EXAMPLE
 String
 Integer
 Floating point numbers
 Boolean
 Array
 Object
 NULL
 A string is a sequence of characters, like "Hello
world!".
 A string can be any text inside quotes.
 We can use single or double quotes:
EXAMPLE
<?php $x = "Hello world!";
echo $x;
echo "<br>";
?>
An integer is a number without decimals.
 Rules for integers:
 An integer must have at least one digit (0-9)
 An integer cannot contain comma or blanks
 An integer must not have a decimal point
 An integer can be either positive or negative
 Integers can be specified in three formats: decimal
(10-based), hexadecimal (16-based - prefixed with
0x) or octal (8-based - prefixed with 0)
EXAMPLE
<?php
$x = 5985;
var_dump($x);
echo "<br>";
$x = -345; // negative number var_dump($x);
echo "<br>";
$x = 0x8C; // hexadecimal number var_dump($x);
echo "<br>";
$x = 047; // octal number
var_dump($x);
?>
 A floating point number is a number with a
Decimal point or a number in exponential form.
In the following example ,the PHP var_dump() function
returns the data type and value of variables:
EXAMPLE
<?php
$x = 10.56765;
var_dump($x);
echo "<br>";
$x = 2.4e3;
var_dump($x);
echo "<br>";
$x = 8E-5;
var_dump($x);
?>
 Booleans can be either TRUE or FALSE.
 $x=true; $y=false;
 Booleans are often used in conditional testing.
 An array stores multiple values in one single
variable.
<?php
$a=array(“a",“b",“c");
var_dump($a);
?>
 An object is a data type which stores data and
information on how to process that data.
 In PHP, an object must be explicitly declared. First
we must declare a class of object.
 For this, we use the class keyword.
 A class is a structure that can contain properties
and methods.
EXAMPLE
<?php
class Car
{
var $color;
function Car($color="green")
{
$this->color = $color;
}
function what_color()
{
return $this->color;
}
}
?>
 The special NULL value represents that a variable
has no value. NULL is the only possible value of
data type NULL.
 The NULL value identifies whether a variable is
empty or not. Also useful to differentiate between
the empty string and null values of databases.
EXAMPLE
<?php
$x="Hello world!";
$x=null;
var_dump($x);
?>
Thank u

More Related Content

What's hot

Php tutorial
Php tutorialPhp tutorial
Php tutorial
Niit
 
Php(report)
Php(report)Php(report)
Php(report)
Yhannah
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
Arjun Shanka
 

What's hot (20)

PHP for hacks
PHP for hacksPHP for hacks
PHP for hacks
 
Php
PhpPhp
Php
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Php by shivitomer
Php by shivitomerPhp by shivitomer
Php by shivitomer
 
Using PHP
Using PHPUsing PHP
Using PHP
 
Sourcerer and Joomla! rev. 20130903
Sourcerer and Joomla! rev. 20130903Sourcerer and Joomla! rev. 20130903
Sourcerer and Joomla! rev. 20130903
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Php Lecture Notes
Php Lecture NotesPhp Lecture Notes
Php Lecture Notes
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
PHP Tutorials
PHP TutorialsPHP Tutorials
PHP Tutorials
 
Php(report)
Php(report)Php(report)
Php(report)
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
PHP Variables and scopes
PHP Variables and scopesPHP Variables and scopes
PHP Variables and scopes
 
PHP Loops and PHP Forms
PHP  Loops and PHP FormsPHP  Loops and PHP Forms
PHP Loops and PHP Forms
 
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersPHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
 
What Is Php
What Is PhpWhat Is Php
What Is Php
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php mysql
Php mysqlPhp mysql
Php mysql
 

Viewers also liked

Judith López Ant.anip course final project
Judith López Ant.anip course final projectJudith López Ant.anip course final project
Judith López Ant.anip course final project
juditlopins
 

Viewers also liked (16)

Crazy road signs
Crazy road signs Crazy road signs
Crazy road signs
 
Judith López Ant.anip course final project
Judith López Ant.anip course final projectJudith López Ant.anip course final project
Judith López Ant.anip course final project
 
Cornilsen.Resume
Cornilsen.ResumeCornilsen.Resume
Cornilsen.Resume
 
Topological spintronics
Topological spintronicsTopological spintronics
Topological spintronics
 
Mobile Moments 2016 - Martin McKenna | iZettle
Mobile Moments 2016 -  Martin McKenna | iZettleMobile Moments 2016 -  Martin McKenna | iZettle
Mobile Moments 2016 - Martin McKenna | iZettle
 
Cassandra - lesson learned
Cassandra  - lesson learnedCassandra  - lesson learned
Cassandra - lesson learned
 
Robert Miller CV uptodate
Robert Miller CV uptodateRobert Miller CV uptodate
Robert Miller CV uptodate
 
Resuscitating Your Omni-Channel Though Mobile
Resuscitating Your Omni-Channel Though MobileResuscitating Your Omni-Channel Though Mobile
Resuscitating Your Omni-Channel Though Mobile
 
Mobile And The Media 5 Ways To Succeed In 2016
Mobile And The Media 5 Ways To Succeed In 2016Mobile And The Media 5 Ways To Succeed In 2016
Mobile And The Media 5 Ways To Succeed In 2016
 
Mobile Moments NYC 2016
Mobile Moments NYC 2016Mobile Moments NYC 2016
Mobile Moments NYC 2016
 
Banking On Mobile - Getting Ready for 2016
Banking On Mobile -  Getting Ready for 2016Banking On Mobile -  Getting Ready for 2016
Banking On Mobile - Getting Ready for 2016
 
Evaluation question 3
Evaluation question 3Evaluation question 3
Evaluation question 3
 
Mobile, Fintech, and Banking Phase II
Mobile, Fintech, and Banking Phase IIMobile, Fintech, and Banking Phase II
Mobile, Fintech, and Banking Phase II
 
HEAD MOTION CONTROLLED BY WHEELCHAIR
HEAD MOTION CONTROLLED BY WHEELCHAIRHEAD MOTION CONTROLLED BY WHEELCHAIR
HEAD MOTION CONTROLLED BY WHEELCHAIR
 
Conflicto
ConflictoConflicto
Conflicto
 
Citizenship stage 2 rey, ryan, nishad
Citizenship stage 2 rey, ryan, nishadCitizenship stage 2 rey, ryan, nishad
Citizenship stage 2 rey, ryan, nishad
 

Similar to Php

1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master
jeeva indra
 

Similar to Php (20)

Php
PhpPhp
Php
 
PHP NOTES FOR BEGGINERS
PHP NOTES FOR BEGGINERSPHP NOTES FOR BEGGINERS
PHP NOTES FOR BEGGINERS
 
PHP
PHPPHP
PHP
 
Basic php 5
Basic php 5Basic php 5
Basic php 5
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
FYBSC IT Web Programming Unit IV PHP and MySQL
FYBSC IT Web Programming Unit IV  PHP and MySQLFYBSC IT Web Programming Unit IV  PHP and MySQL
FYBSC IT Web Programming Unit IV PHP and MySQL
 
WT_PHP_PART1.pdf
WT_PHP_PART1.pdfWT_PHP_PART1.pdf
WT_PHP_PART1.pdf
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
PHP Hypertext Preprocessor
PHP Hypertext PreprocessorPHP Hypertext Preprocessor
PHP Hypertext Preprocessor
 
Prersentation
PrersentationPrersentation
Prersentation
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Introduction to PHP.ppt
Introduction to PHP.pptIntroduction to PHP.ppt
Introduction to PHP.ppt
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
php Chapter 1.pptx
php Chapter 1.pptxphp Chapter 1.pptx
php Chapter 1.pptx
 
Intro to php
Intro to phpIntro to php
Intro to php
 
PHP and MySQL.ppt
PHP and MySQL.pptPHP and MySQL.ppt
PHP and MySQL.ppt
 
Php unit i
Php unit iPhp unit i
Php unit i
 
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
 
1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master
 

Recently uploaded

Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
Atif Razi
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
IT-601 Lecture Notes-UNIT-2.pdf Data Analysis
IT-601 Lecture Notes-UNIT-2.pdf Data AnalysisIT-601 Lecture Notes-UNIT-2.pdf Data Analysis
IT-601 Lecture Notes-UNIT-2.pdf Data Analysis
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docxThe Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
 
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdf
 
Toll tax management system project report..pdf
Toll tax management system project report..pdfToll tax management system project report..pdf
Toll tax management system project report..pdf
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES  INTRODUCTION UNIT-IENERGY STORAGE DEVICES  INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
 

Php

  • 1. BY ANCY RAJU Venture software technologies
  • 2.  PHP is an acronym for "PHP Hypertext Preprocessor"  PHP is a widely-used, open source scripting language  PHP scripts are executed on the server  PHP costs nothing, it is free to download and use
  • 3.  PHP files can contain text, HTML, CSS, JavaScript, and PHP code  PHP code are executed on the server, and the result is returned to the browser as plain HTML  PHP files have extension ".php"
  • 4.  PHP can generate dynamic page content  PHP can create, open, read, write, and close files on the server  PHP can collect form data  PHP can send and receive cookies  PHP can add, delete, modify data in your database  PHP can restrict users to access some pages on your website
  • 5.  PHP can encrypt data  With PHP you are not limited to output HTML.  We can output images, PDF files, and even Flash movies.  We can also output any text, such as XHTML and XML.
  • 6.  PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)  PHP is compatible with almost all servers used today (Apache, IIS, etc.)  PHP supports a wide range of databases  PHP is free. Download it from the official PHP resource: www.php.net  PHP is easy to learn and runs efficiently on the server side
  • 7. You must:  install a web server  install PHP  install a database, such as MySQL
  • 9. PROGRAM <?php echo "<h2>PHP is fun!</h2>”; echo "Hello world!<br>"; echo "I'm about to learn PHP!<br>"; echo "This", " string", " was", " made", "with multiple parameters."; ?>
  • 10. OUTPUT PHP is fun! Hello world! I'm about to learn PHP! This string was made with multiple parameters.
  • 11.  A comment in PHP code is a line that is not read/executed as part of the program.  Its only purpose is to be read by someone who is editing the code!  PHP supports three ways of commenting:
  • 12. <!DOCTYPE html> <html> <body> <?php // This is a single line comment # This is also a single line comment /* This is a multiple lines comment block that spans over more than one line */ ?> </body> </html> EXAMPLE
  • 13.  String  Integer  Floating point numbers  Boolean  Array  Object  NULL
  • 14.  A string is a sequence of characters, like "Hello world!".  A string can be any text inside quotes.  We can use single or double quotes:
  • 15. EXAMPLE <?php $x = "Hello world!"; echo $x; echo "<br>"; ?>
  • 16. An integer is a number without decimals.  Rules for integers:  An integer must have at least one digit (0-9)  An integer cannot contain comma or blanks  An integer must not have a decimal point  An integer can be either positive or negative  Integers can be specified in three formats: decimal (10-based), hexadecimal (16-based - prefixed with 0x) or octal (8-based - prefixed with 0)
  • 17. EXAMPLE <?php $x = 5985; var_dump($x); echo "<br>"; $x = -345; // negative number var_dump($x); echo "<br>"; $x = 0x8C; // hexadecimal number var_dump($x); echo "<br>"; $x = 047; // octal number var_dump($x); ?>
  • 18.  A floating point number is a number with a Decimal point or a number in exponential form. In the following example ,the PHP var_dump() function returns the data type and value of variables:
  • 19. EXAMPLE <?php $x = 10.56765; var_dump($x); echo "<br>"; $x = 2.4e3; var_dump($x); echo "<br>"; $x = 8E-5; var_dump($x); ?>
  • 20.  Booleans can be either TRUE or FALSE.  $x=true; $y=false;  Booleans are often used in conditional testing.
  • 21.  An array stores multiple values in one single variable. <?php $a=array(“a",“b",“c"); var_dump($a); ?>
  • 22.  An object is a data type which stores data and information on how to process that data.  In PHP, an object must be explicitly declared. First we must declare a class of object.  For this, we use the class keyword.  A class is a structure that can contain properties and methods.
  • 23. EXAMPLE <?php class Car { var $color; function Car($color="green") { $this->color = $color; } function what_color() { return $this->color; } } ?>
  • 24.  The special NULL value represents that a variable has no value. NULL is the only possible value of data type NULL.  The NULL value identifies whether a variable is empty or not. Also useful to differentiate between the empty string and null values of databases.