SlideShare a Scribd company logo
1 of 13
Guru99

DEVELOPING WEB APPLICATIONS
WITH PHP

RAD for the World Wide Web

Guru99
By. Krishna Rungta
INTRODUCTION
hat is PHP?
• PHP stands for "PHP Hypertext Preprocessor”
• An embedded scripting language for HTML like ASP or JSP
• A language that combines elements of Perl, C, and Java

Guru99
Guru99

INTRODUCTION
istory of PHP
• Created by Rasmus Lerdorf in 1995 for tracking access to his resume
• Originally a set of Perl scripts known as the “Personal Home Page”
tools
• Rewritten in C with database functionality
• Added a forms interpreter and released as PHP/FI: includes Perl-like
variables, and HTML embedded syntax
PHP LANGUAGE BASICS
ello World!: An Example
• Like Perl, there is more than one way to do it
• <?php echo “Hello World!”; ?>
• <?php
$greeting = “Hello World!”
printf(“%s”, $greeting);
php?>

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Constants define a string or numeric value
• Constants do not begin with a dollar sign
• Examples:
•
•
•
•

define(“COMPANY”, “Acme Enterprises”);
define(“YELLOW”, “#FFFF00”);
define(“PI”, 3.14);
define(“NL”, “<br>n”);

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Using a constant
• print(“Company name: “ . COMPANY . NL);

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Data types
• Integers, doubles and strings
• isValid = true; // Boolean
• 25
// Integer
• 3.14
// Double
• ‘Four’
// String
• “Total value” // Another string

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Data types
• Strings and type conversion
• $street = 123;
• $street = $street . “ Main Street”;
• $city = ‘Naperville’;
$state = ‘IL’;
• $address = $street;
• $address = $address . NL . “$city, $state”;
• $number = $address + 1;
// $number equals 124

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Data types
• Arrays
• Perl-like syntax
• $arr = array("foo" => "bar", 12 => true);
• same as
• $arr[“foo”] = “bar”;
• $arr[12] = true;
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Arrays (cont.)
• <?php
$arr = array("somearray" => array(6 => 5, 13 => 9,
"a" => 42));
echo $arr["somearray"][6]; // 5
echo $arr["somearray"][13]; // 9
echo $arr["somearray"]["a"]; // 42
?>
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Objects
• Currently not much more advanced than than associative arrays
Using constants
• Before version 5.0, objects are passed by value
• Slow
• Functions can not easily change object variables
TRICKS AND TIPS
ebugging
• Feature: PHP is not a strongly typed language
• Variables can be created anywhere in your code

• Undocumented Feature: PHP is not a strongly typed language
• Typos in variable names will cause stuff to happen
RESOURCES
• To Learn more thing about PHP
Just Visit our site

• http://web.guru99.com/
• Thank You

More Related Content

What's hot

What's hot (13)

Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
PHP POWERPOINT SLIDES
PHP POWERPOINT SLIDESPHP POWERPOINT SLIDES
PHP POWERPOINT SLIDES
 
Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web Programming
 
PHP and MySQL
PHP and MySQLPHP and MySQL
PHP and MySQL
 
Web Development Course: PHP lecture 4
Web Development Course: PHP  lecture 4Web Development Course: PHP  lecture 4
Web Development Course: PHP lecture 4
 
Quick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHPQuick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHP
 
Apache Velocity 1.6
Apache Velocity 1.6Apache Velocity 1.6
Apache Velocity 1.6
 
Introducation to php for beginners
Introducation to php for beginners Introducation to php for beginners
Introducation to php for beginners
 
DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014
 
PHP
PHPPHP
PHP
 
Php with my sql
Php with my sqlPhp with my sql
Php with my sql
 
Manipulating Data in Style with SQL
Manipulating Data in Style with SQLManipulating Data in Style with SQL
Manipulating Data in Style with SQL
 

Viewers also liked

Crash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmersCrash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmers
Gil Megidish
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
Dave Cross
 

Viewers also liked (13)

Crash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmersCrash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmers
 
Perl 101
Perl 101Perl 101
Perl 101
 
Vb.net Experiment with Example
Vb.net Experiment with ExampleVb.net Experiment with Example
Vb.net Experiment with Example
 
Setting up and installing perl
Setting up and installing perlSetting up and installing perl
Setting up and installing perl
 
Introduction to perl_ a scripting language
Introduction to perl_ a scripting languageIntroduction to perl_ a scripting language
Introduction to perl_ a scripting language
 
Basic perl programming
Basic perl programmingBasic perl programming
Basic perl programming
 
How to learn to code
How to learn to codeHow to learn to code
How to learn to code
 
Advance java
Advance javaAdvance java
Advance java
 
Building Decision Tree model with numerical attributes
Building Decision Tree model with numerical attributesBuilding Decision Tree model with numerical attributes
Building Decision Tree model with numerical attributes
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
 
Introduction to perl
Introduction to perlIntroduction to perl
Introduction to perl
 
Introduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data AnalyticsIntroduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data Analytics
 

Similar to Php

Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Muhamad Al Imran
 
MIND sweeping introduction to PHP
MIND sweeping introduction to PHPMIND sweeping introduction to PHP
MIND sweeping introduction to PHP
BUDNET
 

Similar to Php (20)

Data Types In PHP
Data Types In PHPData Types In PHP
Data Types In PHP
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopment
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
Synapse india reviews on php website development
Synapse india reviews on php website developmentSynapse india reviews on php website development
Synapse india reviews on php website development
 
Perl bhargav
Perl bhargavPerl bhargav
Perl bhargav
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
 
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
 
Php
PhpPhp
Php
 
Php basics
Php basicsPhp basics
Php basics
 
phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.ppt
 
05php
05php05php
05php
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
PHP
PHPPHP
PHP
 
php (Hypertext Preprocessor)
php (Hypertext Preprocessor)php (Hypertext Preprocessor)
php (Hypertext Preprocessor)
 
INTRODUCTION to php.pptx
INTRODUCTION to php.pptxINTRODUCTION to php.pptx
INTRODUCTION to php.pptx
 
Prersentation
PrersentationPrersentation
Prersentation
 
rtwerewr
rtwerewrrtwerewr
rtwerewr
 
Introduction in php
Introduction in phpIntroduction in php
Introduction in php
 
MIND sweeping introduction to PHP
MIND sweeping introduction to PHPMIND sweeping introduction to PHP
MIND sweeping introduction to PHP
 

More from Guru99

More from Guru99 (14)

Best single, dual monitor stands
Best single, dual monitor standsBest single, dual monitor stands
Best single, dual monitor stands
 
VBSCript Tutorial
VBSCript TutorialVBSCript Tutorial
VBSCript Tutorial
 
Photoshop cc Tutorial
Photoshop cc TutorialPhotoshop cc Tutorial
Photoshop cc Tutorial
 
Apache Tutorial
Apache TutorialApache Tutorial
Apache Tutorial
 
Nodejs Tutorial
Nodejs TutorialNodejs Tutorial
Nodejs Tutorial
 
Asp.net Tutorial
Asp.net TutorialAsp.net Tutorial
Asp.net Tutorial
 
Cassandra Tutorial
Cassandra TutorialCassandra Tutorial
Cassandra Tutorial
 
BigData Hadoop Tutorial
BigData Hadoop TutorialBigData Hadoop Tutorial
BigData Hadoop Tutorial
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 
SQLite Tutorial
SQLite TutorialSQLite Tutorial
SQLite Tutorial
 
Hbase Tutorial
Hbase TutorialHbase Tutorial
Hbase Tutorial
 
Introduction to Jmeter
Introduction to JmeterIntroduction to Jmeter
Introduction to Jmeter
 
Lrt top 10
Lrt top 10Lrt top 10
Lrt top 10
 
What is Loadrunner ?
What is Loadrunner ?What is Loadrunner ?
What is Loadrunner ?
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

Php

  • 1. Guru99 DEVELOPING WEB APPLICATIONS WITH PHP RAD for the World Wide Web Guru99 By. Krishna Rungta
  • 2. INTRODUCTION hat is PHP? • PHP stands for "PHP Hypertext Preprocessor” • An embedded scripting language for HTML like ASP or JSP • A language that combines elements of Perl, C, and Java Guru99
  • 3. Guru99 INTRODUCTION istory of PHP • Created by Rasmus Lerdorf in 1995 for tracking access to his resume • Originally a set of Perl scripts known as the “Personal Home Page” tools • Rewritten in C with database functionality • Added a forms interpreter and released as PHP/FI: includes Perl-like variables, and HTML embedded syntax
  • 4. PHP LANGUAGE BASICS ello World!: An Example • Like Perl, there is more than one way to do it • <?php echo “Hello World!”; ?> • <?php $greeting = “Hello World!” printf(“%s”, $greeting); php?> Guru99
  • 5. PHP LANGUAGE BASICS onstants, Data Types and Variables • Constants define a string or numeric value • Constants do not begin with a dollar sign • Examples: • • • • define(“COMPANY”, “Acme Enterprises”); define(“YELLOW”, “#FFFF00”); define(“PI”, 3.14); define(“NL”, “<br>n”); Guru99
  • 6. PHP LANGUAGE BASICS onstants, Data Types and Variables • Using a constant • print(“Company name: “ . COMPANY . NL); Guru99
  • 7. PHP LANGUAGE BASICS onstants, Data Types and Variables • Data types • Integers, doubles and strings • isValid = true; // Boolean • 25 // Integer • 3.14 // Double • ‘Four’ // String • “Total value” // Another string Guru99
  • 8. PHP LANGUAGE BASICS onstants, Data Types and Variables • Data types • Strings and type conversion • $street = 123; • $street = $street . “ Main Street”; • $city = ‘Naperville’; $state = ‘IL’; • $address = $street; • $address = $address . NL . “$city, $state”; • $number = $address + 1; // $number equals 124 Guru99
  • 9. PHP LANGUAGE BASICS onstants, Data Types and Variables • Data types • Arrays • Perl-like syntax • $arr = array("foo" => "bar", 12 => true); • same as • $arr[“foo”] = “bar”; • $arr[12] = true;
  • 10. PHP LANGUAGE BASICS onstants, Data Types and Variables • Arrays (cont.) • <?php $arr = array("somearray" => array(6 => 5, 13 => 9, "a" => 42)); echo $arr["somearray"][6]; // 5 echo $arr["somearray"][13]; // 9 echo $arr["somearray"]["a"]; // 42 ?>
  • 11. PHP LANGUAGE BASICS onstants, Data Types and Variables • Objects • Currently not much more advanced than than associative arrays Using constants • Before version 5.0, objects are passed by value • Slow • Functions can not easily change object variables
  • 12. TRICKS AND TIPS ebugging • Feature: PHP is not a strongly typed language • Variables can be created anywhere in your code • Undocumented Feature: PHP is not a strongly typed language • Typos in variable names will cause stuff to happen
  • 13. RESOURCES • To Learn more thing about PHP Just Visit our site • http://web.guru99.com/ • Thank You