CakeFest 2024: The Official CakePHP Conference

variant_mod

(PHP 5, PHP 7, PHP 8)

variant_modDivides two variants and returns only the remainder

Descripción

variant_mod(mixed $left, mixed $right): variant

Divides left by right and returns the remainder.

Parámetros

left

The left operand.

right

The right operand.

Nota:

Al igual que con todas las funciones aritméticas variantes, los parámetros de esta función pueden ser tanto un tipo nativo de PHP (integer, string, de punto flotante, boolean o null), o una instancia de una clase COM, VARIANT o DOTNET. Los tipos nativos de PHP serán convertidos en variantes usando las mismas reglas tal como se encuentran en el constructor para la clase variant. Los objetos COM y DOTNET tomarán el valor de sus propiedades predeterminadas adoptadas y lo utilizarán como el valor variante.

Las funciones aritméticas variantes son wrappers alrededor de las funciones con nombres similares en la librería COM; para más información sobre estas funciones, consulte la librería MSDN. Las funciones de PHP tienen nombres ligeramente diferentes; por ejemplo, variant_add() en PHP corresponde a VarAdd() en la documentación MSDN.

Valores devueltos

Returns the remainder of the division.

Errores/Excepciones

Throws a com_exception on failure.

Ver también

  • variant_div() - Returns the result from dividing two variants
  • variant_idiv() - Converts variants to integers and then returns the result from dividing them

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top