SlideShare ist ein Scribd-Unternehmen logo
1 von 21
PHP Definition:   PHP stands for Personal Home Page. The PHP Hypertext Preprocessor allows web developers to create dynamic content that interacts with databases. PHP applications are normally found on Linux servers and in conjunction with MySQL databases. It provides those servers with functionality similar to that provided to the Windows platform by Active Server Pages technology.
PHP statements must be inside of PHP tags to be processed by the PHP interpreter. Each PHP statement must end with a semi-colon, which tells the PHP interpreter that the statement is complete. If a semi-colon does not appear at the end of a line, the interpreter will assume that the statement continues onto the next line.
The PHP interpreter condenses all sequential whitespace in PHP scripts to a single whitespace. This convenient feature allows PHP developers to structure their code in a readable format without being concerned about the effects of line breaks and tabs.
COMMENTS PHP has two forms of comments: * Single-line comments begin with a double slash (//). * Multi-line comments begin with "/*" and end with "*/".
SYNTAX // This is a single-line comment /* This is a multi-line comment. */
PHP FUNCTION There are literally hundreds of built-in PHP functions that do everything from returning the current date and time on the server to pulling data out of a database. A function might take zero arguments (e.g, phpinfo(), which returns information on the PHP environment) or it might take several arguments
SYNTAX The syntax for calling a function is straightforward: Syntax: function_name(arguments);
SAMPLE CODE PhpBasics/Demos/PhpInfo.php <html> <head> <title>PHPINFO</title> </head> <body> <?php //Output information on the PHP environment phpinfo(); ?> </body> </html>
PHP OPERATOR Mathematical Operators Operator Name.  Example: Addition + $a + $b Subtraction - $a - $b
Multiplication * $a * $b Division  / $a / $b Modulus % $a % $b
String Operators Operator Name  Example . Concatenation  $a . $b 'Hello' . ' world!'
Assignment Operators Operator Name Example  = Assignment  $a = 1; $c = 'Hello' . ' world!'; += -= *= /= %= .=
Combination Assignment   $a += 1; $a -= 1; $a *= 2; $a /= 2; $a %= 2; $a .= ' world!';
Increment By One ++ $a++; ++$a; Decrement By One -- $a--; --$a;
Other Operators Operator Name Example Ternary   ?: $foo = ($age >= 18) ? 'adult' : 'child'; Error Suppression   @ Creating Dynamic Pages $a = @(1/0);
SAMPLE CODE: <html> <head> <title>Hello World!</title> </head> <body> <?php //Write out Hello World! echo 'Hello World!'; ?> </body> </html> PHP.NET
BASIC PHP SYNTAX PHP Tags: PHP code must be contained in special tags so that the PHP interpreter can identify it. Depending on the PHP configuration, these tags can take several forms: < ?php PHP CODE GOES IN HERE ?>
This is the most commonly used (and recommended) form. It is known as the XML style, because it can be used inside of an XML document without causing the document to become poorly formed. <script language=&quot;php&quot;> PHP CODE GOES IN HERE </script>
Less is more.  The shortest and easiest way to deal with the xml tag problem assuming short tags is enabled and you don't care to listen to people who want you to always use the full php tag is this: <<??>?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?>
you also can use this kind of syntax: <?php if( condition ): ?>    <?php else: ?>    <?php endif; ?>
<? PHP CODE GOES HERE ?> &quot;Short&quot; tags. <% PHP CODE GOES HERE %>  HTML STYLE TAG

Weitere ähnliche Inhalte

Was ist angesagt? (18)

PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Php1
Php1Php1
Php1
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
PHP-MySQL Database Connectivity Using XAMPP Server
PHP-MySQL Database Connectivity Using XAMPP ServerPHP-MySQL Database Connectivity Using XAMPP Server
PHP-MySQL Database Connectivity Using XAMPP Server
 
Php1
Php1Php1
Php1
 
php
phpphp
php
 
PHP Tutorials
PHP TutorialsPHP Tutorials
PHP Tutorials
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
Apache web service
Apache web serviceApache web service
Apache web service
 
PHP presentation - Com 585
PHP presentation - Com 585PHP presentation - Com 585
PHP presentation - Com 585
 
Php ppt
Php pptPhp ppt
Php ppt
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
MySQL Presentation
MySQL PresentationMySQL Presentation
MySQL Presentation
 
Apache web server
Apache web serverApache web server
Apache web server
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Php technical presentation
Php technical presentationPhp technical presentation
Php technical presentation
 

Ähnlich wie PHP Definition (38

Ähnlich wie PHP Definition (38 (20)

Php1
Php1Php1
Php1
 
Php1
Php1Php1
Php1
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Php intro
Php introPhp intro
Php intro
 
IT Club @ NCP - PHP Workshop May 10, 2011
IT Club @ NCP - PHP Workshop May 10, 2011IT Club @ NCP - PHP Workshop May 10, 2011
IT Club @ NCP - PHP Workshop May 10, 2011
 
Php
PhpPhp
Php
 
PHP.docx
PHP.docxPHP.docx
PHP.docx
 
Php1(2)
Php1(2)Php1(2)
Php1(2)
 
php basics
php basicsphp basics
php basics
 
PHP
PHPPHP
PHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Article 01 What Is Php
Article 01   What Is PhpArticle 01   What Is Php
Article 01 What Is Php
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 

Kürzlich hochgeladen

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

PHP Definition (38

  • 1. PHP Definition: PHP stands for Personal Home Page. The PHP Hypertext Preprocessor allows web developers to create dynamic content that interacts with databases. PHP applications are normally found on Linux servers and in conjunction with MySQL databases. It provides those servers with functionality similar to that provided to the Windows platform by Active Server Pages technology.
  • 2. PHP statements must be inside of PHP tags to be processed by the PHP interpreter. Each PHP statement must end with a semi-colon, which tells the PHP interpreter that the statement is complete. If a semi-colon does not appear at the end of a line, the interpreter will assume that the statement continues onto the next line.
  • 3. The PHP interpreter condenses all sequential whitespace in PHP scripts to a single whitespace. This convenient feature allows PHP developers to structure their code in a readable format without being concerned about the effects of line breaks and tabs.
  • 4. COMMENTS PHP has two forms of comments: * Single-line comments begin with a double slash (//). * Multi-line comments begin with &quot;/*&quot; and end with &quot;*/&quot;.
  • 5. SYNTAX // This is a single-line comment /* This is a multi-line comment. */
  • 6. PHP FUNCTION There are literally hundreds of built-in PHP functions that do everything from returning the current date and time on the server to pulling data out of a database. A function might take zero arguments (e.g, phpinfo(), which returns information on the PHP environment) or it might take several arguments
  • 7. SYNTAX The syntax for calling a function is straightforward: Syntax: function_name(arguments);
  • 8. SAMPLE CODE PhpBasics/Demos/PhpInfo.php <html> <head> <title>PHPINFO</title> </head> <body> <?php //Output information on the PHP environment phpinfo(); ?> </body> </html>
  • 9. PHP OPERATOR Mathematical Operators Operator Name. Example: Addition + $a + $b Subtraction - $a - $b
  • 10. Multiplication * $a * $b Division / $a / $b Modulus % $a % $b
  • 11. String Operators Operator Name Example . Concatenation $a . $b 'Hello' . ' world!'
  • 12. Assignment Operators Operator Name Example = Assignment $a = 1; $c = 'Hello' . ' world!'; += -= *= /= %= .=
  • 13. Combination Assignment $a += 1; $a -= 1; $a *= 2; $a /= 2; $a %= 2; $a .= ' world!';
  • 14. Increment By One ++ $a++; ++$a; Decrement By One -- $a--; --$a;
  • 15. Other Operators Operator Name Example Ternary ?: $foo = ($age >= 18) ? 'adult' : 'child'; Error Suppression @ Creating Dynamic Pages $a = @(1/0);
  • 16. SAMPLE CODE: <html> <head> <title>Hello World!</title> </head> <body> <?php //Write out Hello World! echo 'Hello World!'; ?> </body> </html> PHP.NET
  • 17. BASIC PHP SYNTAX PHP Tags: PHP code must be contained in special tags so that the PHP interpreter can identify it. Depending on the PHP configuration, these tags can take several forms: < ?php PHP CODE GOES IN HERE ?>
  • 18. This is the most commonly used (and recommended) form. It is known as the XML style, because it can be used inside of an XML document without causing the document to become poorly formed. <script language=&quot;php&quot;> PHP CODE GOES IN HERE </script>
  • 19. Less is more.  The shortest and easiest way to deal with the xml tag problem assuming short tags is enabled and you don't care to listen to people who want you to always use the full php tag is this: <<??>?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?>
  • 20. you also can use this kind of syntax: <?php if( condition ): ?>   <?php else: ?>   <?php endif; ?>
  • 21. <? PHP CODE GOES HERE ?> &quot;Short&quot; tags. <% PHP CODE GOES HERE %> HTML STYLE TAG