0% found this document useful (0 votes)
57 views12 pages

Lesson 4 - PHP Operators

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views12 pages

Lesson 4 - PHP Operators

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

PHP Operators and Control

Structures

Slide 1
Objectives
• To understand the different types of operators that are
available on PHP.
• To know what is operator precedence and operator
associativity in PHP.
• To ensure that programs expression are logically correct by
using the correct referencing values of its precedence.
• To use escape sequence properly in the program.
• To know the different approach of control structures.
• To know the fundamentals syntax for conditional and
looping structures.
• To properly use the compound expression using the logical
operators.
• To know the rules of break, continue, and goto statements.
• To see some alternative enclosure for control structures.

Murach’s ASP.NET 3.5/C#, C1 © 2008, Mike Murach & Associates, Inc.


Slide 2
Operators
An operator is a symbol that specifies a particular action in an expression

Operator Precedence, Associativity, and Pupose

Slide 3
Operator Precedence, Associativity, and Pupose

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.124

Slide 4
Operator Precedence
is a characteristic of operators that determines the order in which they
evaluate the operands surrounding them.

Output:

Slide 5
Operator Associativity
is a characteristic of an operator specifies how operations of the same
precedence are evaluated as they are executed.

Output:

Example:

Slide 6
Arithmetic Operator

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.124

Assignment Operator

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.126

Slide 7
Increment and Decrement Operator

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.127

Example: Output:

Slide 8
Comparison Operator

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.129

Example: Output:

Slide 9
Logical Operator

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.128

Equality Operator

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.129

Slide 10
Bitwise Operator

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.130

Example: Output:

Slide 11
Escape Sequences

Beginning PHP and MySQL 3rd Edition by: W. Jason Gilmore pp.132

Slide 12

You might also like