-
Notifications
You must be signed in to change notification settings - Fork 0
/
Comprasions.php
58 lines (48 loc) · 1.47 KB
/
Comprasions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
class Comprasions {
/**
* Checks if two values are equal using strict comparison.
*
* @param mixed $varOne The first value to compare.
* @param mixed $varTwo The second value to compare.
* @return bool True if the values are equal, false otherwise.
*/
function isEqual($varOne, $varTwo): bool
{
return $varOne === $varTwo;
}
/**
* Checks if two values are not equal using strict comparison.
*
* @param mixed $varOne The first value to compare.
* @param mixed $varTwo The second value to compare.
* @return bool True if the values are not equal, false otherwise.
*/
function isNotEqual($varOne, $varTwo): bool
{
return $varOne !== $varTwo;
}
/**
* Checks if one value is greater than another.
*
* @param mixed $varOne The first value to compare.
* @param mixed $varTwo The second value to compare.
* @return bool True if the first value is greater than the second, false otherwise.
*/
function isGreaterThan($varOne, $varTwo): bool
{
return $varOne > $varTwo;
}
/**
* Checks if one value is less than another.
*
* @param mixed $varOne The first value to compare.
* @param mixed $varTwo The second value to compare.
* @return bool True if the first value is less than the second, false otherwise.
*/
function isLessThan($varOne, $varTwo): bool
{
return $varOne < $varTwo;
}
}
?>