PHP 8.3.4 Released!

variant_fix

(PHP 5, PHP 7, PHP 8)

variant_fixReturns the integer portion of a variant

Beschreibung

variant_fix(mixed $value): variant

Gets the integer portion of a variant.

Parameter-Liste

value

The variant.

Hinweis:

Wie bei allen arithmetischen Variantfunktionen, können die Parameter dieser Funktion entweder native PHP-Typen (Integer, String, Fließkomma, Boolean oder null) oder Instanzen einer COM-, VARIANT- oder DOTNET-Klasse sein. Native PHP-Typen werden nach den gleichen Regeln in Varianten umgewandelt wie auch im Konstruktor der variant-Klasse. Für COM- und DOTNET-Objekte wird der Wert ihrer Standardeigenschaft genommen und als Variantenwert genutzt.

Die arithmetischen Variantenfunktionen sind Wrapper für die ähnlich benannten Funktionen der COM-Bibliothek, weiterführende Informationen hierzu finden sie in der MSDN-Bibliothek. Die PHP-Funktionen sind leicht abweichend benannt, so korrespondiert variant_add() in PHP zu VarAdd() in der MSDN-Dokumentation.

Rückgabewerte

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

Fehler/Exceptions

Throws a com_exception on failure.

Anmerkungen

Warnung

This documentation is based on the MSDN documentation; it appears that this function is either the same as variant_int(), or that there is an error in the MSDN documentation.

Siehe auch

add a note

User Contributed Notes

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