Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 181 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BinaryComparison:: (10 methods):
  strcmpLowercaseFirst()
  strcmpAllowNull()
  compare()
  evaluateComparison()
  equal()
  greaterThanOrEqual()
  lessThanOrEqual()
  greaterThan()
  lessThan()
  notEqual()


Class: BinaryComparison  - X-Ref

strcmpLowercaseFirst($str1, $str2)   X-Ref
Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters.

param: null|string $str1 First string value for the comparison
param: null|string $str2 Second string value for the comparison

strcmpAllowNull($str1, $str2)   X-Ref
PHP8.1 deprecates passing null to strcmp.

param: null|string $str1 First string value for the comparison
param: null|string $str2 Second string value for the comparison

compare($operand1, $operand2, string $operator)   X-Ref

param: mixed $operand1
param: mixed $operand2

evaluateComparison($operand1, $operand2, string $operator, bool $useLowercaseFirstComparison)   X-Ref
No description

equal($operand1, $operand2)   X-Ref

param: mixed $operand1
param: mixed $operand2

greaterThanOrEqual($operand1, $operand2, bool $useLowercaseFirstComparison)   X-Ref

param: mixed $operand1
param: mixed $operand2

lessThanOrEqual($operand1, $operand2, bool $useLowercaseFirstComparison)   X-Ref

param: mixed $operand1
param: mixed $operand2

greaterThan($operand1, $operand2, bool $useLowercaseFirstComparison)   X-Ref

param: mixed $operand1
param: mixed $operand2

lessThan($operand1, $operand2, bool $useLowercaseFirstComparison)   X-Ref

param: mixed $operand1
param: mixed $operand2

notEqual($operand1, $operand2)   X-Ref

param: mixed $operand1
param: mixed $operand2