PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

variant_imp> <variant_get_type
Last updated: Fri, 02 May 2008

view this page in

variant_idiv

(PHP 5)

variant_idiv — Converts variants to integers and then returns the result from dividing them

Descrierea

mixed variant_idiv ( mixed $left , mixed $right )

Converts left and right to integer values, and then performs integer division.

Parametri

left

The left operand.

right

The right operand.

Notă: Ca şi în cazul tuturor funcţiilor aritmetice de variante, parametrii pentru această funcţie pot fi sau de un tip PHP indigen (integer, string, floating point, boolean sau NULL), sau o instanţă a claselor COM, VARIANT sau DOTNET. Tipurile PHP indigene vor fi convertite în variante utilizând aceleaşi reguli ca şi cele din constructorul VARIANT clasei. De la obiectele COM şi DOTNET se va lua valoarea proprietăţii lor implicite şi va fi utilizată ca valoare a variantei.
Funcţiile aritmetice ale variantelor sunt nişte învelişuri ale funcţiilor denumite similar în biblioteca COM; pentru informaţii suplimentare despre aceste funcţii consultaţi biblioteca MSDN. Funcţiile PHP sunt denumite un pic diferit; spre exemplu, variant_add() din PHP corespunde cu VarAdd() în documentaţia MSDN.

Valorile întroarse

Variant Integer Division Rules
If Then
Both expressions are of the string, date, character, boolean type Division and integer is returned
One expression is a string type and the other a character Division
One expression is numeric and the other is a string Division
Both expressions are numeric Division
Either expression is NULL NULL is returned
Both expressions are empty A com_exception with code DISP_E_DIVBYZERO is thrown

Vedeţi de asemenea



add a note add a note User Contributed Notes
variant_idiv
There are no user contributed notes for this page.

variant_imp> <variant_get_type
Last updated: Fri, 02 May 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites