php8.5
Home/ Manual/ com / functions/ variant_mul

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

left

The left operand.

right

The right operand.

Boolean values are converted to -1 for false and 0 for true. Variant-arith

Return Values

IfThen
Both expressions are of the string, date, character, boolean typeMultiplication
One expression is a string type and the other a characterMultiplication
One expression is numeric and the other is a stringMultiplication
Both expressions are numericMultiplication
Either expression is NULLNULL is returned
Both expressions are emptyEmpty string is returned

Errors/Exceptions

Throws a com_exception on failure.

See Also

Source: reference/com/functions/variant-mul.xml · from the official PHP manual (php/doc-en)