Hi,
Binary operators are used on two operands:
2 + 3
14 * 3.1415
$i – 1
These examples are also simple examples of expressions.
PHP can only perform binary operations on two operands that have the
same type. However, if the two operands have different types, PHP automatically
converts one of them to the other’s type, according to the following rules
(unless stated differently, such as in the concatenation operator).
Attachment 201 Booleans, nulls, and resources behave like integers, and they convert in the following manner:- Boolean: False = 0, True = 1
- Null = 0
- Resource = The resource’s # (id)