variant_mul
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Multiplies the values of the two variants
Description
variant_mul(mixed $left, mixed $right): variant
Multiplies left by right.
Parameters
leftThe left operand.
rightThe right operand.
Boolean values are converted to -1 for false and 0 for true. Variant-arith
Return Values
| If | Then |
|---|---|
| Both expressions are of the string, date, character, boolean type | Multiplication |
| One expression is a string type and the other a character | Multiplication |
| One expression is numeric and the other is a string | Multiplication |
| Both expressions are numeric | Multiplication |
| Either expression is NULL | NULL is returned |
| Both expressions are empty | Empty string is returned |
Errors/Exceptions
Throws a com_exception on failure.