Php – Syntax Overview

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/php-syntax-overview/
PINTEREST
PINTEREST
INSTAGRAM

PHP Tutorial Topics

  1. Introduction To PHP
  2. Installing PHP To Linux
  3. Installing PHP To Windows
  4. PHP Hello World Project with Eclipse
  5. PHP Syntax
  6. PHP Variables and Types
  7. PHP String Types
  8. PHP Numeric Type (Integer, Float, Double)
  9. PHP Boolean Type
  10. PHP Arrays
  11. PHP Operators
  12. PHP Ternary Operators
  13. PHP Constants
  14. PHP If..Elseif..Else Conditional Statements
  15. PHP Switch..Case Conditional Statements
  16. PHP For and Foreach Loop Statements
  17. PHP While and Do While Statements
  18. PHP Functions
  19. PHP Class and Objects
  20. PHP Date and Time Operations

Extension

Php source or code files generally ends with .php but generally the extension is not important. Following extensions can be used too.

  • php4
  • php5
  • php7

Php Tags

Web based programming languages generally uses tags in order to surround related code. Php is web based programming language too and uses <?php ... ?> tags. Second tag is not compulsory if the code ends without different language but makes the code more elegant .

Below we can see new code here.

Semicolons

Php is C and C++ centric language and uses semicolons to specify end of statement. Each semicolon end the line or statement like below.

There is another usage of semicolons too. We can use multiple semicolons for multiple statements like below.

Comments

While developing applications we generally need to take notes on code or insert some explanation about the code. We call these explanation comment. comments do not have any effect on application run time.

We can also specify comments after end of the statement like the second example

Multiline Comments

Sometimes single line comments are not enough. We can specify multi line comments with /* and */ like below.

Embed Into Html

Php code can be embedded into Html code easily. In the server side first the php code is executed and the result is put into related position. Below a code is embedded into html.

Case Sensitivity

Php is case sensitive programming language. Case sensitive simply means the same word with uppercase and lowercase are interpreted as different. For example cat is not the same as CAT or Cat . All of them are different.

PHP Tutorial Topics

  1. Introduction To PHP
  2. Installing PHP To Linux
  3. Installing PHP To Windows
  4. PHP Hello World Project with Eclipse
  5. PHP Syntax
  6. PHP Variables and Types
  7. PHP String Types
  8. PHP Numeric Type (Integer, Float, Double)
  9. PHP Boolean Type
  10. PHP Arrays
  11. PHP Operators
  12. PHP Ternary Operators
  13. PHP Constants
  14. PHP If..Elseif..Else Conditional Statements
  15. PHP Switch..Case Conditional Statements
  16. PHP For and Foreach Loop Statements
  17. PHP While and Do While Statements
  18. PHP Functions
  19. PHP Class and Objects
  20. PHP Date and Time Operations
RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/php-syntax-overview/
PINTEREST
PINTEREST
INSTAGRAM

One Reply to “Php – Syntax Overview”

Leave a Reply

Your email address will not be published.