PHP - greater than: >

greater than operator is a logical operator that is used to compare two numbers.

>

Description

par1 > par2
Used keywords: >

Input


Output

  • Result - logical value returns a true, if the first number is greater than the second, otherwise false.
Note: it works over all types of numbers.

Examples

PHP

greater than the possible of use:
$a = 2 > funkc(3); 
$b = 1.14 > $x; 
if ( $y > 32 )  
   $c=true;

PHP

even one example in what situations we can use the operation greater than:
$x > $y
10 > f(9.9)
$j > 128 || false

PHP

Other pieces of example codes:
if ($x>0xabc)
  $y = (double)$x / 0xa;    // y = 466
10 >$a && $a>5
$a>1 || $a<100
do --$i; while ( $i > 0);
10 >$a || $a<5
$x > 3.14

you can find it in the following collections: relational operators
Languages: en hu cz sk