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

variant_int

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Returns the integer portion of a variant

Description

variant_int(mixed $value): variant

Gets the integer portion of a variant.

Parameters

value

The variant.

Variant-arith

Return Values

If value is negative, then the first negative integer less than or equal to the variant is returned, otherwise returns the integer portion of the value of value.

Errors/Exceptions

Throws a com_exception on failure.

See Also

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