PHP logical operators Program

   PHP logical operators 

PHP logical operators



Logical Operators:

  • AND (&& or and)
  • OR (|| or or)
  • NOT (! or not)
  • XOR (exclusive OR) (xor)

 PHP logical operators 

Example :-


<?php
$a=10;
$b=5;
$c=20;
$d=20;
var_dump(($a<$c)&&($c==$d)&&($b<$c));//true
var_dump(!(($a<$c)&&($c==$d)&&($b<$c)));//false
var_dump(($a>$d)||($b<$c));//true
?>

 logical operators php

Output

logical operators php/output









Related Post :-

registration form

php program to print heart star pattern

html button tag

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example