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

search for in the

variant_eqv> <variant_date_to_timestamp
Last updated: Fri, 20 Nov 2009

view this page in

variant_div

(PHP 5)

variant_divReturns the result from dividing two variants

Descrierea

mixed variant_div ( mixed $left , mixed $right )

Divides left by right and returns the result.

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 Division Rules
If Then
Both expressions are of the string, date, character, boolean type Double is returned
One expression is a string type and the other a character Division and a double is returned
One expression is numeric and the other is a string Division and a double is returned.
Both expressions are numeric Division and a double is returned
Either expression is NULL NULL is returned
right is empty and left is anything but empty A com_exception with code DISP_E_DIVBYZERO is thrown
left is empty and right is anything but empty. 0 as type double is returned
Both expressions are empty A com_exception with code DISP_E_OVERFLOW is thrown

Vedeţi de asemenea

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



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

variant_eqv> <variant_date_to_timestamp
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites