Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / PHP

Greater than or equal to (>=)

Check whether an order reaches the minimum quantity. The result is true even when the quantity exactly equals the minimum.

Version: PHP 8.4; repository runtime, production runtime not attested

Syntax

$left >= $right

Check whether an order reaches the minimum quantity. The result is true even when the quantity exactly equals the minimum.

For numbers the result indicates whether a threshold condition holds. Test the value exactly at the boundary separately. Two numeric strings are compared numerically even when their lengths differ.

  • 7 >= 8 → false
  • 8 >= 8 → true
  • "12" >= "9" → true

Examples

<?php
echo json_encode(7 >= 8), PHP_EOL;
echo json_encode(8 >= 8), PHP_EOL;
echo json_encode("12" >= "9"), PHP_EOL;

Result

false
true
true

Sources