SlideShare una empresa de Scribd logo
1 de 26
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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 a 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 a 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
 

Último

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Último (20)

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 

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.