Course Content

  • PHP EXPRESSION OPERATORS Part 2

Course Content

FAQs

There are 3 main logical operators in PHP which are used to manipulate the boolean values. They are AND, OR, and NOT. These logical operators have different effects on the boolean values. AND: The first operand is false only if both operands are false.OR: The first operand is true only if either operand is true.NOT: Negates the boolean value of its operand clause clause i.e., reverses its value giving it a new boolean value of 1 if it was 0 or vice versa.

Comparison operators are used to compare two values. Logical operators are used to combine or manipulate the comparison results. Comparison Operators: Equal signs (==) - checks for equality, not equal to (!=) - checks if the two values are not equal, greater than (>), less than (<), greater than or equal (>=), less than or equal (<=) - checks if one value is greater/lesser/equal to another value. Logical Operators: AND (&), OR (|) - combines two logical expressions together, NOT (!): inverts the outcome of a logical expression.

The == operator evaluates both operands to see if they are equal, producing true or false. The === operator evaluates both operands to see if they are strictly equal, producing true or false. If the two operands are not of the same type, PHP attempts to convert them to a common type.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
App Store
397K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
13K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere