SlideShare a Scribd company logo
1 of 8
What is PHP?
Who invented? : Rasmus Lerdorf in 1994
History in 1994,Mr. Lerdrof developed PHP for personal use and then
in 1995,he was released first version of PHP with name PERSONAL
HOMEPAGE,and it was being used on approx 50000 site in 1997.
•PHP stands for PHP: Hypertext Preprocessor.
•PHP is a server-side scripting language
•Open Source Technology
•Robust
•Freeware
How it works

PHP is a general-purpose scripting language that is used in
creating Web pages, and can be embedded in HTML code. (PHP
stands for "Hypertext Pre processor" even though the acronym
doesn't match up exactly.)

PHP is an open-source program, which means it's available for
free on the Web

There are three main areas where PHP scripts are used.
− Server-side scripting.
− Command line scripting.
− Writing desktop applications
PHP Syntax
Method 1: Short Open Tag
<? … ?> // Not Recommended
Method 2:
<?php
….
?>
Each PHP sentence is terminated with semi-colon (;)
EXAMPLE:
<?php echo 'Hello World'; ?>
Comments
Single line Comment
//This is a comment
Multi line comment
/*
This is
a comment
block
*/
EXAMPLE:
<?php
//This is comment
echo '<p>Hello World</p>';
?>
Example
<html>
<head>
<title>PHP Example</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
Literals
All strings must be enclosed in single quote or double quote
Example:
<?php echo '<p>Hello World</p>'; ?>
<?php echo "<p>Hello World</p>"; ?>
NumbersNumbers are not enclosed in quotes
Example:
<?php echo 123; ?>
Booleans can be directly written as true or false
Language Construct
PHP have two language constructs which is used to display data
1. echo()
2. Print()
Language construct can be used with or without brackets
Example:
<?php
echo '<p>Hello World</p>';
print '<p>Hello World</p>';
echo ('<p>Hello World</p>');
print ('<p>Hello World</p>');
?>
Thank You
Thank You for reading… 
If you have any query feel free to contact us on at
info@creativedev.in
For more information about PHP, Go to our site
www.creativedev.in

More Related Content

What's hot

Managing frontend libs in your Symfony project
Managing frontend libs in your Symfony projectManaging frontend libs in your Symfony project
Managing frontend libs in your Symfony projectMassimiliano Arione
 
QBASIC
QBASICQBASIC
QBASICnivi88
 
Asynchronous PHP | Codesushi - Warsaw 2017
Asynchronous PHP | Codesushi - Warsaw 2017Asynchronous PHP | Codesushi - Warsaw 2017
Asynchronous PHP | Codesushi - Warsaw 2017Krzysztof (Chris) Ozog
 

What's hot (6)

Managing frontend libs in your Symfony project
Managing frontend libs in your Symfony projectManaging frontend libs in your Symfony project
Managing frontend libs in your Symfony project
 
What the HACK is HHVM?
What the HACK is HHVM?What the HACK is HHVM?
What the HACK is HHVM?
 
Hiphop - PHP
Hiphop - PHPHiphop - PHP
Hiphop - PHP
 
QBASIC
QBASICQBASIC
QBASIC
 
Asynchronous PHP | Codesushi - Warsaw 2017
Asynchronous PHP | Codesushi - Warsaw 2017Asynchronous PHP | Codesushi - Warsaw 2017
Asynchronous PHP | Codesushi - Warsaw 2017
 
An alternative to xs
An alternative to xsAn alternative to xs
An alternative to xs
 

Similar to Introduction to PHP Basics (20)

Php
PhpPhp
Php
 
Php unit i
Php unit i Php unit i
Php unit i
 
PHP
PHPPHP
PHP
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
unitI-Introduction to php.pptx
unitI-Introduction to php.pptxunitI-Introduction to php.pptx
unitI-Introduction to php.pptx
 
What is PHP ?
What is PHP ?What is PHP ?
What is PHP ?
 
PHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionPHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor Introduction
 
Php unit i
Php unit iPhp unit i
Php unit i
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 
PHP LICTURES ..........
PHP LICTURES ..........PHP LICTURES ..........
PHP LICTURES ..........
 
Php(2)
Php(2)Php(2)
Php(2)
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Php ppt
Php pptPhp ppt
Php ppt
 
PHP
 PHP PHP
PHP
 
Php course with live project training in janakpuri, New Delhi
Php course with live project training in janakpuri, New Delhi Php course with live project training in janakpuri, New Delhi
Php course with live project training in janakpuri, New Delhi
 
PHP
PHPPHP
PHP
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Training ppt
Training pptTraining ppt
Training ppt
 
php
phpphp
php
 

More from TheCreativedev Blog

More from TheCreativedev Blog (9)

Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
Node js Modules and Event Emitters
Node js Modules and Event EmittersNode js Modules and Event Emitters
Node js Modules and Event Emitters
 
Node.js Basics
Node.js Basics Node.js Basics
Node.js Basics
 
PHP - DataType,Variable,Constant,Operators,Array,Include and require
PHP - DataType,Variable,Constant,Operators,Array,Include and requirePHP - DataType,Variable,Constant,Operators,Array,Include and require
PHP - DataType,Variable,Constant,Operators,Array,Include and require
 
Canvas in html5
Canvas in html5Canvas in html5
Canvas in html5
 
Network Security Through FIREWALL
Network Security Through FIREWALLNetwork Security Through FIREWALL
Network Security Through FIREWALL
 
Post via e mail in word press
Post via e mail in word pressPost via e mail in word press
Post via e mail in word press
 
Post via e mail in WordPress
Post via e mail in WordPressPost via e mail in WordPress
Post via e mail in WordPress
 
TO ADD NEW URL REWRITE RULE IN WORDPRESS
TO ADD NEW URL REWRITE RULE IN WORDPRESSTO ADD NEW URL REWRITE RULE IN WORDPRESS
TO ADD NEW URL REWRITE RULE IN WORDPRESS
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

Introduction to PHP Basics

  • 1. What is PHP? Who invented? : Rasmus Lerdorf in 1994 History in 1994,Mr. Lerdrof developed PHP for personal use and then in 1995,he was released first version of PHP with name PERSONAL HOMEPAGE,and it was being used on approx 50000 site in 1997. •PHP stands for PHP: Hypertext Preprocessor. •PHP is a server-side scripting language •Open Source Technology •Robust •Freeware
  • 2. How it works  PHP is a general-purpose scripting language that is used in creating Web pages, and can be embedded in HTML code. (PHP stands for "Hypertext Pre processor" even though the acronym doesn't match up exactly.)  PHP is an open-source program, which means it's available for free on the Web  There are three main areas where PHP scripts are used. − Server-side scripting. − Command line scripting. − Writing desktop applications
  • 3. PHP Syntax Method 1: Short Open Tag <? … ?> // Not Recommended Method 2: <?php …. ?> Each PHP sentence is terminated with semi-colon (;) EXAMPLE: <?php echo 'Hello World'; ?>
  • 4. Comments Single line Comment //This is a comment Multi line comment /* This is a comment block */ EXAMPLE: <?php //This is comment echo '<p>Hello World</p>'; ?>
  • 6. Literals All strings must be enclosed in single quote or double quote Example: <?php echo '<p>Hello World</p>'; ?> <?php echo "<p>Hello World</p>"; ?> NumbersNumbers are not enclosed in quotes Example: <?php echo 123; ?> Booleans can be directly written as true or false
  • 7. Language Construct PHP have two language constructs which is used to display data 1. echo() 2. Print() Language construct can be used with or without brackets Example: <?php echo '<p>Hello World</p>'; print '<p>Hello World</p>'; echo ('<p>Hello World</p>'); print ('<p>Hello World</p>'); ?>
  • 8. Thank You Thank You for reading…  If you have any query feel free to contact us on at info@creativedev.in For more information about PHP, Go to our site www.creativedev.in