diff --git a/reference/com/functions/class.com.xml b/reference/com/functions/class.com.xml index 09377398fc..7dfd2e7bd6 100644 --- a/reference/com/functions/class.com.xml +++ b/reference/com/functions/class.com.xml @@ -1,262 +1,264 @@ - + - - - COM - COM class - - + + + COM + COM class + + $obj = new COM("Application.ID") - - - Description - - The COM class allows you to instantiate an OLE compatible COM object and - call its methods and access its properties. - - - - Methods - - comCOM::COM - stringmodule_name - mixedserver_name - intcodepage - stringtypelib - - - COM class constructor. The parameters have the following meanings: - - module_name - - - Can be a ProgID, Class ID or Moniker that names the component to load. - - - A ProgID is typically the application or DLL name, followed by a period, - followed by the object name. e.g: Word.Application. - - - A Class ID is the UUID that uniquely identifies a given class. - - - A Moniker is a special form of naming, similar in concept to a URL - scheme, that identifies a resource and specifies how it should be - loaded. As an example, you could load up Word and get an object - representing a word document by specifying the full path to the word - document as the module name, or you can use LDAP: as - a moniker to use the ADSI interface to LDAP. - - + + + Description + + The COM class allows you to instantiate an OLE compatible COM object and + call its methods and access its properties. + + + + Methods + + comCOM::COM + stringmodule_name + mixedserver_name + intcodepage + stringtypelib + + + COM class constructor. The parameters have the following meanings: + + + module_name + + + Can be a ProgID, Class ID or Moniker that names the component to load. + + + A ProgID is typically the application or DLL name, followed by a period, + followed by the object name. e.g: Word.Application. + + + A Class ID is the UUID that uniquely identifies a given class. + + + A Moniker is a special form of naming, similar in concept to a URL + scheme, that identifies a resource and specifies how it should be + loaded. As an example, you could load up Word and get an object + representing a word document by specifying the full path to the word + document as the module name, or you can use LDAP: as + a moniker to use the ADSI interface to LDAP. + + - server_name - - - The name of the DCOM server on which the component should be loaded and - run. If &null;, the object is run using the default for the - application. The default is typically to run it on the local machine, - although the administrator might have configured the application to - launch on a different machine. - - - If you specify a non-&null; value for server, PHP will refuse to load - the object unless the configuration option - is set to &true;. - - - If server_name is an array, it should contain the - following elements (case sensitive!). Note that they are all optional - (although you need to specify both Username and Password together); if - you omit the Server setting, the default server will be used (as - mentioned above), and the instantiation of the object will not be - affected by the - directive. - - - DCOM server name - - - - server_name key - type - description - - - - - Server - string - The name of the server. - - - Username - string - The username to connect as. - - - Password - string - The password for Username. - - - Flags - integer - One or more of the following constants, logically OR'd together: - CLSCTX_INPROC_SERVER, - CLSCTX_INPROC_HANDLER, - CLSCTX_LOCAL_SERVER, - CLSCTX_REMOTE_SERVER, - CLSCTX_SERVER and - CLSCTX_ALL. The default value if not - specified here is CLSCTX_SERVER if you also - omit Server, or - CLSCTX_REMOTE_SERVER if you do specify a - server. You should consult the Microsoft documentation for - CoCreateInstance for more information on the meaning of these - constants; you will typically never have to use them. - - - + + server_name + + + The name of the DCOM server on which the component should be loaded and + run. If &null;, the object is run using the default for the + application. The default is typically to run it on the local machine, + although the administrator might have configured the application to + launch on a different machine. + + + If you specify a non-&null; value for server, PHP will refuse to load + the object unless the configuration option + is set to &true;. + + + If server_name is an array, it should contain the + following elements (case sensitive!). Note that they are all optional + (although you need to specify both Username and Password together); if + you omit the Server setting, the default server will be used (as + mentioned above), and the instantiation of the object will not be + affected by the + directive. +
+ DCOM server name + + + + server_name key + type + description + + + + + Server + string + The name of the server. + + + Username + string + The username to connect as. + + + Password + string + The password for Username. + + + Flags + integer + One or more of the following constants, logically OR'd together: + CLSCTX_INPROC_SERVER, + CLSCTX_INPROC_HANDLER, + CLSCTX_LOCAL_SERVER, + CLSCTX_REMOTE_SERVER, + CLSCTX_SERVER and + CLSCTX_ALL. The default value if not + specified here is CLSCTX_SERVER if you also + omit Server, or + CLSCTX_REMOTE_SERVER if you do specify a + server. You should consult the Microsoft documentation for + CoCreateInstance for more information on the meaning of these + constants; you will typically never have to use them. + + +
-
-
+
+ - codepage - - - Specifies the codepage that is used to convert strings to - unicode-strings and vice versa. The conversion is applied whenever a - PHP string is passed as a parameter or returned from a method of this - COM object. The code page is sticky in PHP 5, which means that it will - propagate to objects and variants returned from the object. - - - Possible values are - CP_ACP (use system default ANSI code page - the - default if this parameter is omitted), - CP_MACCP, - CP_OEMCP, CP_SYMBOL, - CP_THREAD_ACP (use codepage/locale set for the - current executing thread), CP_UTF7 - and CP_UTF8. You may also use the number for a - given codepage; consult the Microsoft documentation for more details on - codepages and their numeric values. - - + + codepage + + + Specifies the codepage that is used to convert strings to + unicode-strings and vice versa. The conversion is applied whenever a + PHP string is passed as a parameter or returned from a method of this + COM object. The code page is sticky in PHP 5, which means that it will + propagate to objects and variants returned from the object. + + + Possible values are + CP_ACP (use system default ANSI code page - the + default if this parameter is omitted), + CP_MACCP, + CP_OEMCP, CP_SYMBOL, + CP_THREAD_ACP (use codepage/locale set for the + current executing thread), CP_UTF7 + and CP_UTF8. You may also use the number for a + given codepage; consult the Microsoft documentation for more details on + codepages and their numeric values. + + - - -
+ + + - - Overloaded Methods + + Overloaded Methods + + The returned object is an overloaded object, which means that PHP does + not see any fixed methods as it does with regular classes; instead, any + property or method accesses are passed through to COM. + + + Starting with PHP 5, PHP will automatically detect methods that accept + parameters by reference, and will automatically convert regular PHP + variables to a form that can be passed by reference. This means that you + can call the method very naturally; you needn't go to any extra effort in + your code. + + + In PHP 4, to pass parameters by reference you need to create an instance + of the class to wrap the + byref parameters. + + - - The returned object is an overloaded object, which means that PHP does - not see any fixed methods as it does with regular classes; instead, any - property or method accesses are passed through to COM. - - - - Starting with PHP 5, PHP will automatically detect methods that accept - parameters by reference, and will automatically convert regular PHP - variables to a form that can be passed by reference. This means that you - can call the method very naturally; you needn't go to any extra effort in - your code. - - - - In PHP 4, to pass parameters by reference you need to create an instance - of the class to wrap the - byref parameters. - - - - - - Pseudo Methods - - - In PHP versions prior to 5, a number of not very pleasant hacks meant that - the following method names were not passed through to COM and were handled - directly by PHP. PHP 5 eliminates these things; read the details below to - determine how to fix your scripts. These magic method names are case - insensitive. - - - - voidCOM::AddRef - - - Artificially adds a reference count to the COM object. - You should never need to use this method. It exists as a - logical complement to the Release() method below. - - - voidCOM::Release - - - Artificially removes a reference count from the COM object. - - You should never need to use this method. Its existence in PHP is a bug - designed to work around a bug that keeps COM objects running longer than - they should. - - - - - Pseudo Methods for Iterating - - - These pseudo methods are only available if - com_isenum returns &true;, in which case, they hide - any methods with the same names that might otherwise be provided by the - COM object. These methods have all been eliminated in PHP 5, and you - should use instead. - - - - variantCOM::All - - - Returns a variant representing a SafeArray that has 10 elements; - each element will be an empty/null variant. This function was supposed to - return an array containing all the elements from the iterator, but was - never completed. Do not use. - - - - variantCOM::Next - - - Returns a variant representing the next element available from - the iterator, or &false; when there are no more elements. - - - - variantCOM::Prev - - - Returns a variant representing the previous element available from - the iterator, or &false; when there are no more elements. - - - - voidCOM::Reset - - - Rewinds the iterator back to the start. - - - - COM examples - - - COM example (1) - + + Pseudo Methods + + In PHP versions prior to 5, a number of not very pleasant hacks meant that + the following method names were not passed through to COM and were handled + directly by PHP. PHP 5 eliminates these things; read the details below to + determine how to fix your scripts. These magic method names are case + insensitive. + + + voidCOM::AddRef + + + + Artificially adds a reference count to the COM object. + + + + You should never need to use this method. It exists as a logical complement + to the Release() method below. + + + + voidCOM::Release + + + + Artificially removes a reference count from the COM object. + + + + You should never need to use this method. Its existence in PHP is a bug + designed to work around a bug that keeps COM objects running longer than + they should. + + + + + Pseudo Methods for Iterating + + These pseudo methods are only available if + com_isenum returns &true;, in which case, they hide + any methods with the same names that might otherwise be provided by the + COM object. These methods have all been eliminated in PHP 5, and you + should use instead. + + + variantCOM::All + + + + Returns a variant representing a SafeArray that has 10 elements; + each element will be an empty/null variant. This function was supposed to + return an array containing all the elements from the iterator, but was + never completed. Do not use. + + + variantCOM::Next + + + + Returns a variant representing the next element available from + the iterator, or &false; when there are no more elements. + + + variantCOM::Prev + + + Returns a variant representing the previous element available from + the iterator, or &false; when there are no more elements. + + + voidCOM::Reset + + + + Rewinds the iterator back to the start. + + + + COM examples + + + COM example (1) + Quit(); $word = null; ?> ]]> - - - - - - COM example (2) - + + + + + + COM example (2) + ]]> - - - - -
+ + + + + - - - DOTNET - DOTNET class - - + + + + DOTNET + DOTNET class + + $obj = new DOTNET("assembly", "classname") - - - Description - - The DOTNET class allows you to instantiate a class from a .Net assembly and - call its methods and access its properties. - - - - Methods - - stringDOTNET::DOTNET - stringassembly_name - stringclass_name - intcodepage - - - DOTNET class constructor. assembly_name specifies - which assembly should be loaded, and class_name - specifices which class in that assembly to instantiate. You may - optionally specify a codepage to use for unicode - string transformations; see the class - for more details on code pages. - - - - The returned object is an overloaded object, which means that PHP does - not see any fixed methods as it does with regular classes; instead, any - property or method accesses are passed through to COM and from there to - DOTNET. In other words, the .Net object is mapped through the COM - interoperability layer provided by the .Net runtime. - - - - Once you have created a DOTNET object, PHP treats it identically to any - other COM object; all the same rules apply. - - - - - DOTNET example - + + + Description + + The DOTNET class allows you to instantiate a class from a .Net assembly and + call its methods and access its properties. + + + + Methods + + stringDOTNET::DOTNET + stringassembly_name + stringclass_name + intcodepage + + + DOTNET class constructor. assembly_name specifies + which assembly should be loaded, and class_name + specifices which class in that assembly to instantiate. You may + optionally specify a codepage to use for unicode + string transformations; see the class + for more details on code pages. + + + The returned object is an overloaded object, which means that PHP does + not see any fixed methods as it does with regular classes; instead, any + property or method accesses are passed through to COM and from there to + DOTNET. In other words, the .Net object is mapped through the COM + interoperability layer provided by the .Net runtime. + + + Once you have created a DOTNET object, PHP treats it identically to any + other COM object; all the same rules apply. + + + + DOTNET example + Push(".Net"); - $stack->Push("Hello "); - echo $stack->Pop() . $stack->Pop(); + $stack = new DOTNET("mscorlib", "System.Collections.Stack"); + $stack->Push(".Net"); + $stack->Push("Hello "); + echo $stack->Pop() . $stack->Pop(); ?> ]]> - - + + + + + + You need to install the .Net runtime on your web server to take advantage + of this feature. - - - - You need to install the .Net runtime on your web server to take advantage - of this feature. - - - - + + + - - - - VARIANT - VARIANT class - - - $vVar = new VARIANT($var) - - - Description - - The VARIANT is COM's equivalent of the PHP zval; it is a structure that - can contain a value with a range of different possible types. The VARIANT - class provided by the COM extension allows you to have more control over - the way that PHP passes values to and from COM. - - - - Methods - - objectVARIANT::VARIANT - mixedvalue - inttype - intcodepage - - - VARIANT class constructor. Parameters: - - value - - - initial value. if omitted, or set to &null; an VT_EMPTY object is created. - - - - type - - - specifies the content type of the VARIANT object. Possible values are - one of the VT_XXX . - - - In PHP versions prior to PHP 5, you could force PHP to pass a variant - object by reference by OR'ing VT_BYREF - with the type. In PHP 5, this hack is not - supported; instead, PHP 5 can detect parameters passed by reference - automatically; they do not even need to be passed as VARIANT objects. - - - Consult the MSDN library for additional information - on the VARIANT type. - - - - codepage - - - specifies the codepage that is used to convert strings to - unicode. See the parameter of the same name in the - class for more information. - - - - - - - - PHP versions prior to PHP 5 define a number of (undocumented) virtual properties - for instances of the VARIANT class; these properties have all been removed in - PHP 5 in favour of its more natural syntax; these differences are best - highlighted by example: - - - - - Variant example, PHP 4.x style - + + + + VARIANT + VARIANT class + + + $vVar = new VARIANT($var) + + + Description + + The VARIANT is COM's equivalent of the PHP zval; it is a structure that + can contain a value with a range of different possible types. The VARIANT + class provided by the COM extension allows you to have more control over + the way that PHP passes values to and from COM. + + + + Methods + + objectVARIANT::VARIANT + mixedvalue + inttype + intcodepage + + + VARIANT class constructor. Parameters: + + value + + + initial value. if omitted, or set to &null; an VT_EMPTY object is created. + + + + type + + + specifies the content type of the VARIANT object. Possible values are + one of the VT_XXX . + + + In PHP versions prior to PHP 5, you could force PHP to pass a variant + object by reference by OR'ing VT_BYREF + with the type. In PHP 5, this hack is not + supported; instead, PHP 5 can detect parameters passed by reference + automatically; they do not even need to be passed as VARIANT objects. + + + Consult the MSDN library for additional information + on the VARIANT type. + + + + codepage + + + specifies the codepage that is used to convert strings to + unicode. See the parameter of the same name in the + class for more information. + + + + + + + PHP versions prior to PHP 5 define a number of (undocumented) virtual properties + for instances of the VARIANT class; these properties have all been removed in + PHP 5 in favour of its more natural syntax; these differences are best + highlighted by example: + + + + Variant example, PHP 4.x style + type . "
"; print "The value is " . $v->value . "
"; ?> ]]> -
-
-
- - - - Variant example, PHP 5 style - + + + + + + Variant example, PHP 5 style + "; print "The value is " . $v . "
"; ?> ]]> -
-
-
- +
+
+
+ + The reason for the change is that, internally, the COM extension sees + VARIANT, COM and DOTNET classes as the same thing, and the design + philosophy for these classes is that all property and member accesses are + passed through to COM with no interference. The new syntax is more + natural and less effort, and most of the removed virtual properties didn't + make any sense in a PHP context in any case. + + - The reason for the change is that, internally, the COM extension sees - VARIANT, COM and DOTNET classes as the same thing, and the design - philosophy for these classes is that all property and member accesses are - passed through to COM with no interference. The new syntax is more - natural and less effort, and most of the removed virtual properties didn't - make any sense in a PHP context in any case. + PHP 5 takes a much simpler approach to handling VARIANTs; when returning + a value or fetching a variant property, the variant is converted to a PHP + value only when there is a direct mapping between the types that would + not result in a loss of information. In all other cases, the result is + returned as an instance of the VARIANT class. You can force PHP to + convert or evaluate the variant as a PHP native type by using a casting + operator explicitly, or implicitly casting to a string by + printing it. You may use the wide range of variant + functions to perform arithmetic operations on variants without forcing a + conversion or risking a loss of data. - - - - PHP 5 takes a much simpler approach to handling VARIANTs; when returning - a value or fetching a variant property, the variant is converted to a PHP - value only when there is a direct mapping between the types that would - not result in a loss of information. In all other cases, the result is - returned as an instance of the VARIANT class. You can force PHP to - convert or evaluate the variant as a PHP native type by using a casting - operator explicitly, or implicitly casting to a string by - printing it. You may use the wide range of variant - functions to perform arithmetic operations on variants without forcing a - conversion or risking a loss of data. - - - - - See also variant_get_type. - - -
-
+ + + See also variant_get_type. + + + - - - - com_addref - - Increases the components reference counter [deprecated] - - - - Description - - voidcom_addref - - - - Increases the components reference counter. - - - - - You should never need to use this function. - - - - - + + + + com_addref + Increases the components reference counter [deprecated] + + + Description + + voidcom_addref + + + + Increases the components reference counter. + + + + You should never need to use this function. + + + + - - - - com_create_guid - - Generate a globally unique identifier (GUID) - - - - Description - - stringcom_create_guid - - - - - Generates a Globally Unique Identifier (GUID) and returns it as a string. - A GUID is generated in the same way as DCE UUID's, except that the - Microsoft convention is to enclose a GUID in curly braces. - - - - See also uuid_create in the PECL uuid extension. - - - - + + + + com_create_guid + Generate a globally unique identifier (GUID) + + + Description + + stringcom_create_guid + + + + Generates a Globally Unique Identifier (GUID) and returns it as a string. + A GUID is generated in the same way as DCE UUID's, except that the + Microsoft convention is to enclose a GUID in curly braces. + + + See also uuid_create in the PECL uuid extension. + + + - - - - com_event_sink - - Connect events from a COM object to a PHP object - - - - Description - - boolcom_event_sink - variantcomobject - objectsinkobject - mixedsinkinterface - + + + + com_event_sink + Connect events from a COM object to a PHP object + + + Description + + boolcom_event_sink + variantcomobject + objectsinkobject + mixedsinkinterface + - - Instructs COM to sink events generated by - comobject into the PHP object - sinkobject. PHP will attempt to use the default - dispinterface type specified by the typelibrary associated with - comobject, but you may override this choice by - setting sinkinterface to the name of the - dispinterface that you want to use. - + + Instructs COM to sink events generated by + comobject into the PHP object + sinkobject. PHP will attempt to use the default + dispinterface type specified by the typelibrary associated with + comobject, but you may override this choice by + setting sinkinterface to the name of the + dispinterface that you want to use. + - - sinkobject should be an instance of a class with - methods named after those of the desired dispinterface; you may use - com_print_typeinfo to help generate a template class - for this purpose. - + + sinkobject should be an instance of a class with + methods named after those of the desired dispinterface; you may use + com_print_typeinfo to help generate a template class + for this purpose. + - - Be careful how you use this feature; if you are doing something similar - to the example below, then it doesn't really make sense to run it in a - web server context. - + + Be careful how you use this feature; if you are doing something similar + to the example below, then it doesn't really make sense to run it in a + web server context. + - - COM event sink example - + + COM event sink example + terminated) { $ie = null; ?> ]]> - - + + - - See also com_print_typeinfo, - com_message_pump. - - + + See also com_print_typeinfo, + com_message_pump. + - - + + + - - - com_get_active_object - - Returns a handle to an already running instance of a COM object - - - - Description - - variantcom_get_active_object - stringprogid - intcode_page - + + + + com_get_active_object + Returns a handle to an already running instance of a COM object + + + Description + + variantcom_get_active_object + stringprogid + intcode_page + - - com_get_active_object is similar to creating a new - instance of a object, except that it will - only return an object to your script if the object is already running. - OLE applications use something known as the Running Object Table to - allow well-known applications to be launched only once; this function - exposes the COM library function GetActiveObject() to get a handle on a - running instance. - - - progid must be either the ProgID or CLSID for the - object that you want to access (for example - Word.Application). code_page - acts in precisely the same way that it does for the class. - - - If the requested object is running, it will be returned to your script - just like any other COM object. Otherwise a com_exception - will be raised. There are a variety of reasons why - this function might fail, the most common being that the object is not - already running. In that situation, the exception error code will be - MK_E_UNAVAILABLE; you can use the - getCode method of the exception object to check the - exception code. - + + com_get_active_object is similar to creating a new + instance of a object, except that it will + only return an object to your script if the object is already running. + OLE applications use something known as the Running Object Table to + allow well-known applications to be launched only once; this function + exposes the COM library function GetActiveObject() to get a handle on a + running instance. + + + progid must be either the ProgID or CLSID for the + object that you want to access (for example + Word.Application). code_page + acts in precisely the same way that it does for the class. + + + If the requested object is running, it will be returned to your script + just like any other COM object. Otherwise a com_exception + will be raised. There are a variety of reasons why + this function might fail, the most common being that the object is not + already running. In that situation, the exception error code will be + MK_E_UNAVAILABLE; you can use the + getCode method of the exception object to check the + exception code. + - - - Using com_get_active_object in a web server context - is not always a smart idea. Most COM/OLE applications are not designed - to handle more than one client concurrently, even (or especially!) - Microsoft Office. You should read Considerations for Server-Side - Automation of Office for more information on the general issues - involved. - - + + + Using com_get_active_object in a web server context + is not always a smart idea. Most COM/OLE applications are not designed + to handle more than one client concurrently, even (or especially!) + Microsoft Office. You should read Considerations for Server-Side + Automation of Office for more information on the general issues + involved. + + - - + + + - - - com_get - - Gets the value of a COM Component's property [deprecated] - - - - Description - - mixedcom_get - resourcecom_object - stringproperty - - - Returns the value of the property of the - COM component referenced by com_object. - Returns &false; on error. - - - - Don't use com_get(), use OO syntax instead - + + + com_get + Gets the value of a COM Component's property [deprecated] + + + Description + + mixedcom_get + resourcecom_object + stringproperty + + + Returns the value of the property of the + COM component referenced by com_object. + Returns &false; on error. + + + + Don't use com_get(), use OO syntax instead + property; // instead of this: $var = com_get($obj, 'property'); ?> ]]> - - - + + + - &com.use-oo-instead; + &com.use-oo-instead; - - + + + - - - com_invoke - - Calls a COM component's method [deprecated] - - - - Description - - mixedcom_invoke - resourcecom_object - stringfunction_name - mixedfunction_parameters - - - com_invoke invokes the method - named function_name of the COM - component referenced by com_object. - com_invoke returns &false; on error, - returns the function_name's return - value on success. All the extra parameters - function_parameters are passed to - the method function_name. - - - - Don't use com_invoke(), use OO syntax instead - + + + com_invoke + Calls a COM component's method [deprecated] + + + Description + + mixedcom_invoke + resourcecom_object + stringfunction_name + mixedfunction_parameters + + + com_invoke invokes the method + named function_name of the COM + component referenced by com_object. + com_invoke returns &false; on error, + returns the function_name's return + value on success. All the extra parameters + function_parameters are passed to + the method function_name. + + + + Don't use com_invoke(), use OO syntax instead + method($one, $two); // instead of this: $val = com_invoke($obj, 'method', $one, $two); ?> ]]> - - - + + + - &com.use-oo-instead; - - + &com.use-oo-instead; + + + - - - com_isenum - Indicates if a COM object has an IEnumVariant interface for iteration [deprecated] - - - Description - - boolcom_isenum - variantcom_module - - - Checks to see if a COM object can be enumerated using the - Next() method hack. Returns &true; if it can, &false; if it cannot. - See class for more details on these - methods. - - - - This function does not exist in PHP 5; use the more natural - foreach statement to iterate - over the contents of COM objects. See for - more details. - - - - + + + com_isenum + Indicates if a COM object has an IEnumVariant interface for iteration [deprecated] + + + Description + + boolcom_isenum + variantcom_module + + + Checks to see if a COM object can be enumerated using the + Next() method hack. Returns &true; if it can, &false; if it cannot. + See class for more details on these + methods. + + + + This function does not exist in PHP 5; use the more natural + foreach statement to iterate + over the contents of COM objects. See for + more details. + + + + + - - - com_load_typelib - Loads a Typelib - - - Description - - boolcom_load_typelib - stringtypelib_name - boolcase_insensitive - - - Loads a type-library and registers its constants in the engine, as though - they were defined using define. The - case_insensitive behaves in the same way as the - parameter with the same name in the define function. - - - typelib_name can be one of the following: - - - - The filename of a .tlb file or the executable module - that contains the type library. - - - - - The type library GUID, followed by its version number, for example - {00000200-0000-0010-8000-00AA006D2EA4},2,0. - - - - - The type library name, e.g. Microsoft OLE DB ActiveX Data - Objects 1.0 Library. - - - + + + com_load_typelib + Loads a Typelib + + + Description + + boolcom_load_typelib + stringtypelib_name + boolcase_insensitive + + + Loads a type-library and registers its constants in the engine, as though + they were defined using define. The + case_insensitive behaves in the same way as the + parameter with the same name in the define function. + + + typelib_name can be one of the following: + + + + The filename of a .tlb file or the executable module + that contains the type library. + + + + + The type library GUID, followed by its version number, for example + {00000200-0000-0010-8000-00AA006D2EA4},2,0. + + + + + The type library name, e.g. Microsoft OLE DB ActiveX Data + Objects 1.0 Library. + + + - PHP will attempt to resolve the type library in this order, as the - process gets more and more expensive as you progress down the list; - searching for the type library by name is handled by physically - enumerating the registry until we find a match. - + PHP will attempt to resolve the type library in this order, as the + process gets more and more expensive as you progress down the list; + searching for the type library by name is handled by physically + enumerating the registry until we find a match. + - - Note that it is much more efficient to use the - - configuration setting to pre-load and register the constants, - although not so flexible. - + + Note that it is much more efficient to use the + + configuration setting to pre-load and register the constants, + although not so flexible. + - - If you have turned on , - then PHP will attempt to automatically register the constants associated - with a COM object when you instantiate it. This depends on the - interfaces provided by the COM object itself, and may not always be - possible. - - - - + + If you have turned on , + then PHP will attempt to automatically register the constants associated + with a COM object when you instantiate it. This depends on the + interfaces provided by the COM object itself, and may not always be + possible. + + + + + - - - com_load - - Creates a new reference to a COM component [deprecated] - - - - Description - - resourcecom_load - stringmodule_name - string - server_name - - int - codepage - - - - Equivalent to using the new operator to create an - instance of the class. You should do - that instead of calling this function. - - - - Don't use com_load(), use OO syntax instead - + + + com_load + Creates a new reference to a COM component [deprecated] + + + Description + + resourcecom_load + stringmodule_name + stringserver_name + intcodepage + + + Equivalent to using the new operator to create an + instance of the class. You should do + that instead of calling this function. + + + + Don't use com_load(), use OO syntax instead + ]]> - - + + + + + + + + This function does not exist in PHP 5; use the class instead. - - - - - This function does not exist in PHP 5; use the class instead. - - - - + + + + - - - com_message_pump - - Process COM messages, sleeping for up to timeoutms milliseconds - - - - Description - - boolcom_message_pump - inttimeoutms - + + + com_message_pump + Process COM messages, sleeping for up to timeoutms milliseconds + + + Description + + boolcom_message_pump + inttimeoutms + - - This function will sleep for up to timeoutms - milliseconds, or until a message arrives in the queue. If a message or - messages arrives before the timeout, they will be dispatched, and the - function will return &true;. If the timeout occurs and no messages were - processed, the return value will be &false;. If you do not specify a - value for timeoutms, then 0 will be assumed. A 0 - value means that no waiting will be performed; if there are messages - pending they will be dispatched as before; if there are no messages - pending, the function will return &false; immediately without sleeping. - + + This function will sleep for up to timeoutms + milliseconds, or until a message arrives in the queue. If a message or + messages arrives before the timeout, they will be dispatched, and the + function will return &true;. If the timeout occurs and no messages were + processed, the return value will be &false;. If you do not specify a + value for timeoutms, then 0 will be assumed. A 0 + value means that no waiting will be performed; if there are messages + pending they will be dispatched as before; if there are no messages + pending, the function will return &false; immediately without sleeping. + - - The purpose of this function is to route COM calls between apartments and - handle various synchronization issues. This allows your script to wait - efficiently for events to be triggered, while still handling other events - or running other code in the background. You should use it in a loop, as - demonstrated by the example in the com_event_sink - function, until you are finished using event bound COM objects. - + + The purpose of this function is to route COM calls between apartments and + handle various synchronization issues. This allows your script to wait + efficiently for events to be triggered, while still handling other events + or running other code in the background. You should use it in a loop, as + demonstrated by the example in the com_event_sink + function, until you are finished using event bound COM objects. + - - + + + - - - com_print_typeinfo - - Print out a PHP class definition for a dispatchable interface - - - - Description + + + com_print_typeinfo + Print out a PHP class definition for a dispatchable interface + + + Description - - boolcom_print_typeinfo - objectcomobject - stringdispinterface - boolwantsink - + + boolcom_print_typeinfo + objectcomobject + stringdispinterface + boolwantsink + - - The purpose of this function is to help generate a skeleton class for use - as an event sink. You may also use it to generate a dump of any COM - object, provided that it supports enough of the introspection - interfaces, and that you know the name of the interface you want to - display. - + + The purpose of this function is to help generate a skeleton class for use + as an event sink. You may also use it to generate a dump of any COM + object, provided that it supports enough of the introspection + interfaces, and that you know the name of the interface you want to + display. + - - comobject should be either an instance of a COM - object, or be the name of a typelibrary (which will be resolved according - to the rules set out in com_load_typelib). - dispinterface is the name of an IDispatch - descendant interface that you want to display. If - wantsink is &true;, the corresponding sink - interface will be displayed instead. - + + comobject should be either an instance of a COM + object, or be the name of a typelibrary (which will be resolved according + to the rules set out in com_load_typelib). + dispinterface is the name of an IDispatch + descendant interface that you want to display. If + wantsink is &true;, the corresponding sink + interface will be displayed instead. + - - See also com_event_sink, - com_load_typelib. - + + See also com_event_sink, + com_load_typelib. + - - + + + - - - com_release - - Decreases the components reference counter [deprecated] - - - - Description - - voidcom_release - - - - Decreases the components reference counter. - + + + com_release + Decreases the components reference counter [deprecated] + + + Description + + voidcom_release + + + + Decreases the components reference counter. + - - - You should never need to use this function. - - - - - This function has gone away in PHP 5. - + + + You should never need to use this function. + + + + + This function has gone away in PHP 5. + - - + + + - - - com_set - - Assigns a value to a COM component's property - - - - Description - - voidcom_set - resourcecom_object - stringproperty - mixedvalue - - - Sets the value of the property of the COM - component referenced by com_object. - Returns the newly set value if succeeded, &false; on error. - + + + com_set + Assigns a value to a COM component's property + + + Description + + voidcom_set + resourcecom_object + stringproperty + mixedvalue + + + Sets the value of the property of the COM + component referenced by com_object. + Returns the newly set value if succeeded, &false; on error. + - - - Don't use com_set(), use OO syntax instead - + + + Don't use com_set(), use OO syntax instead + property = $value; // instead of this: com_set($obj, 'property', $value); ?> ]]> - - - + + + - &com.use-oo-instead; - - + &com.use-oo-instead; + + - - - variant_abs - - Returns the absolute value of a variant - - - - Description - - mixedvariant_abs - mixedval - + + + + variant_abs + Returns the absolute value of a variant + + + Description + + mixedvariant_abs + mixedval + - - Returns the absolute value of val. - + + Returns the absolute value of val. + - - See also abs. - + + See also abs. + - &com.variant-arith; + &com.variant-arith; - - + + + - - - variant_add - - "Adds" two variant values together and returns the result - - - - Description - - mixedvariant_add - mixedleft - mixedright - + + + variant_add + "Adds" two variant values together and returns the result + + + Description + + mixedvariant_add + mixedleft + mixedright + - - Adds left to right using - the following rules (taken from the MSDN library), which correspond to - those of Visual Basic: + + Adds left to right using + the following rules (taken from the MSDN library), which correspond to + those of Visual Basic: - - Variant Addition Rules - - - - If - Then - - - - - Both expressions are of the string type - Concatenation - - - One expression is a string type and the other a - character - Addition - - - One expression is numeric and the other is a string - Addition - - - Both expressions are numeric - Addition - - - Either expression is NULL - NULL is returned - - - Both expressions are empty - Integer subtype is returned - - - -
-
- - - See also variant_sub. - + + Variant Addition Rules + + + + If + Then + + + + + Both expressions are of the string type + Concatenation + + + One expression is a string type and the other a + character + Addition + + + One expression is numeric and the other is a string + Addition + + + Both expressions are numeric + Addition + + + Either expression is NULL + NULL is returned + + + Both expressions are empty + Integer subtype is returned + + + +
+
- &com.variant-arith; + + See also variant_sub. + -
-
+ &com.variant-arith; + +
+
+ - - - variant_and - - performs a bitwise AND operation between two variants and returns the result - - - - Description - - mixedvariant_and - mixedleft - mixedright - + + + variant_and + performs a bitwise AND operation between two variants and returns the result + + + Description + + mixedvariant_and + mixedleft + mixedright + - - Performs a bitwise AND operation, according to the following truth table; - note that this is slightly different from a regular AND operation. - - Variant AND Rules - - - - If left is - If right is - then the result is - - - - &true;&true;&true; - &true;&false;&false; - &true;&null;&null; - &false;&true;&false; - &false;&false;&false; - &false;&null;&false; - &null;&true;&null; - &null;&false;&false; - &null;&null;&null; - - -
-
- - See also variant_or. - - - &com.variant-arith; + + Performs a bitwise AND operation, according to the following truth table; + note that this is slightly different from a regular AND operation. + + Variant AND Rules + + + + If left is + If right is + then the result is + + + + &true;&true;&true; + &true;&false;&false; + &true;&null;&null; + &false;&true;&false; + &false;&false;&false; + &false;&null;&false; + &null;&true;&null; + &null;&false;&false; + &null;&null;&null; + + +
+
+ + See also variant_or. + -
-
+ &com.variant-arith; + +
+
+ - - - variant_cast - - Convert a variant into a new variant object of another type - - - - Description - - variantvariant_cast - variantvariant - inttype - + + + variant_cast + Convert a variant into a new variant object of another type + + + Description + + variantvariant_cast + variantvariant + inttype + - - This function makes a copy of variant and then - performs a variant cast operation to force the copy to have the type - given by type. type should - be one of the VT_XXX constants. - + + This function makes a copy of variant and then + performs a variant cast operation to force the copy to have the type + given by type. type should + be one of the VT_XXX constants. + - - This function wraps VariantChangeType() in the COM library; consult MSDN - for more information. - + + This function wraps VariantChangeType() in the COM library; consult MSDN + for more information. + - - See also variant_set_type. - + + See also variant_set_type. + - - + + + - - - variant_cat - - concatenates two variant values together and returns the result - - - - Description - - mixedvariant_cat - mixedleft - mixedright - - - - Concatenates left with - right and returns the result. - + + + variant_cat + concatenates two variant values together and returns the result + + + Description + + mixedvariant_cat + mixedleft + mixedright + - - See also for the string - concatenation operator; this function is notionally equivalent to - $left . $right. - + + Concatenates left with + right and returns the result. + - &com.variant-arith; - - + + See also for the string + concatenation operator; this function is notionally equivalent to + $left . $right. + + + &com.variant-arith; + + + - - - variant_cmp - - Compares two variants - - - - Description - - intvariant_cmp - mixedleft - mixedright - intlcid - intflags - + + + variant_cmp + Compares two variants + + + Description + + intvariant_cmp + mixedleft + mixedright + intlcid + intflags + - - Compares left with right - and returns one of the following values: + + Compares left with right + and returns one of the following values: - - Variant Comparision Results - - - - value - meaning - - - - - VARCMP_LT - left is less than - right - - +
+ Variant Comparision Results + + + + value + meaning + + + + + VARCMP_LT + left is less than + right + + - - VARCMP_EQ - left is equal to - right - - + + VARCMP_EQ + left is equal to + right + + - - VARCMP_GT - left is greater than - right - - + + VARCMP_GT + left is greater than + right + + - - VARCMP_NULL - Either left, - right or both are &null; - - + + VARCMP_NULL + Either left, + right or both are &null; + + - - -
-
+ + + +
- - This function will only compare scalar values, not arrays or variant records. - + + This function will only compare scalar values, not arrays or variant records. + - - lcid is a valid Locale Identifier to use when - comparing strings (this affects string collation). - flags can be one or more of the following values - OR'd together, and affects string comparisons: + + lcid is a valid Locale Identifier to use when + comparing strings (this affects string collation). + flags can be one or more of the following values + OR'd together, and affects string comparisons: - - Variant Comparision Flags - - - - value - meaning - - - - - NORM_IGNORECASE - Compare case insensitively - +
+ Variant Comparision Flags + + + + value + meaning + + + + + NORM_IGNORECASE + Compare case insensitively + - - NORM_IGNORENONSPACE - Ignore nonspacing characters - + + NORM_IGNORENONSPACE + Ignore nonspacing characters + - - NORM_IGNORESYMBOLS - Ignore symbols - - - - NORM_IGNOREWIDTH - Ignore string width - + + NORM_IGNORESYMBOLS + Ignore symbols + - - NORM_IGNOREKANATYPE - Ignore Kana type - + + NORM_IGNOREWIDTH + Ignore string width + - - NORM_IGNOREKASHIDA - Ignore Arabic kashida characters - - - -
-
+ + NORM_IGNOREKANATYPE + Ignore Kana type + - &com.variant-arith; -
-
+ + NORM_IGNOREKASHIDA + Ignore Arabic kashida characters + + + + + + + &com.variant-arith; +
+
+ - - - variant_date_from_timestamp - - Returns a variant date representation of a Unix timestamp - - - - Description - - variantvariant_date_from_timestamp - inttimestamp - + + + variant_date_from_timestamp + Returns a variant date representation of a Unix timestamp + + + Description + + variantvariant_date_from_timestamp + inttimestamp + - - Converts timestamp from a unix timestamp value - into a variant of type VT_DATE. This allows easier - interopability between the unix-ish parts of PHP and COM. - + + Converts timestamp from a unix timestamp value + into a variant of type VT_DATE. This allows easier + interopability between the unix-ish parts of PHP and COM. + - - See also variant_date_to_timestamp for the inverse - of this operation, - mktime, time. - + + See also variant_date_to_timestamp for the inverse + of this operation, + mktime, time. + - - + + + - - - variant_date_to_timestamp - - Converts a variant date/time value to Unix timestamp - - - - Description - - intvariant_date_to_timestamp - variantvariant - + + + variant_date_to_timestamp + Converts a variant date/time value to Unix timestamp + + + Description + + intvariant_date_to_timestamp + variantvariant + - - Converts variant from a VT_DATE - (or similar) value into a Unix timestamp. This allows easier - interopability between the Unix-ish parts of PHP and COM. - + + Converts variant from a VT_DATE + (or similar) value into a Unix timestamp. This allows easier + interopability between the Unix-ish parts of PHP and COM. + - - See also variant_date_from_timestamp for the inverse - of this operation, - date, strftime. - - - - + + See also variant_date_from_timestamp for the inverse + of this operation, + date, strftime. + + + + + - - - variant_div - - Returns the result from dividing two variants - - - - Description - - mixedvariant_div - mixedleft - mixedright - + + + variant_div + Returns the result from dividing two variants + + + Description + + mixedvariant_div + mixedleft + mixedright + - - Divides left by right and - returns the result, subject to the following rules: - - - 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 - - - -
-
- - &com.variant-arith; + + Divides left by right and + returns the result, subject to the following rules: -
-
+ + 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 + + + +
+ + + &com.variant-arith; + +
+
+ - - - variant_eqv - - Performs a bitwise equivalence on two variants - - - - Description - - mixedvariant_eqv - mixedleft - mixedright - + + + variant_eqv + Performs a bitwise equivalence on two variants + + + Description + + mixedvariant_eqv + mixedleft + mixedright + - - If each bit in left is equal to the corresponding - bit in right then &true; is returned, otherwise - &false; is returned. - + + If each bit in left is equal to the corresponding + bit in right then &true; is returned, otherwise + &false; is returned. + - &com.variant-arith; - - + &com.variant-arith; + + + - - - variant_fix - - Returns the integer portion ? of a variant - - - - Description - - mixedvariant_fix - mixedvariant - + + + variant_fix + Returns the integer portion ? of a variant + + + Description + + mixedvariant_fix + mixedvariant + - - If variant 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 - variant. - + + If variant 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 + variant. + - - See also variant_int, - variant_round, floor, - ceil, - round. - + + See also variant_int, + variant_round, floor, + ceil, + round. + - - - 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. - - + + + 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. + + - &com.variant-arith; - - + &com.variant-arith; + + - - - variant_get_type - Returns the type of a variant object - - - Description - - intvariant_get_type - variantvariant - - - This function returns an integer value that indicates the type of - variant, which can be an instance of - , - or - classes. The return value - can be compared to one of the VT_XXX constants. - - - The return value for COM and DOTNET objects will usually be - VT_DISPATCH; the only reason this function works for - those classes is because COM and DOTNET are descendants of VARIANT. - - - In PHP versions prior to 5, you could obtain this information from - instances of the VARIANT class ONLY, by reading a fake - type property. See the class for more information on - this. - - - + + + + variant_get_type + Returns the type of a variant object + + + Description + + intvariant_get_type + variantvariant + + + This function returns an integer value that indicates the type of + variant, which can be an instance of + , + or + classes. The return value + can be compared to one of the VT_XXX constants. + + + The return value for COM and DOTNET objects will usually be + VT_DISPATCH; the only reason this function works for + those classes is because COM and DOTNET are descendants of VARIANT. + + + In PHP versions prior to 5, you could obtain this information from + instances of the VARIANT class ONLY, by reading a fake + type property. See the class for more information on + this. + + + + - - - variant_idiv - - Converts variants to integers and then returns the result from dividing them - - - - Description - - mixedvariant_idiv - mixedleft - mixedright - + + + variant_idiv + Converts variants to integers and then returns the result from dividing them + + + Description + + mixedvariant_idiv + mixedleft + mixedright + - - Converts left and right to - integer values, and then performs integer division according the - following rules: - - 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 - - - -
-
- - - See also variant_div. - - &com.variant-arith; + + Converts left and right to + integer values, and then performs integer division according the + following rules: + + 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 + + + +
+
-
-
+ + See also variant_div. + + &com.variant-arith; + +
+
+ - - - variant_imp - - Performs a bitwise implication on two variants - - - - Description - - mixedvariant_imp - mixedleft - mixedright - + + + variant_imp + Performs a bitwise implication on two variants + + + Description + + mixedvariant_imp + mixedleft + mixedright + - - Performs a bitwise implication operation, according to the following truth table: - - Variant Implication Table - - - - If left is - If right is - then the result is - - - - &true;&true;&true; - &true;&false;&true; - &true;&null;&true; - &false;&true;&true; - &false;&false;&true; - &false;&null;&true; - &null;&true;&true; - &null;&false;&null; - &null;&null;&null; - - -
-
+ + Performs a bitwise implication operation, according to the following truth table: + + Variant Implication Table + + + + If left is + If right is + then the result is + + + + &true;&true;&true; + &true;&false;&true; + &true;&null;&true; + &false;&true;&true; + &false;&false;&true; + &false;&null;&true; + &null;&true;&true; + &null;&false;&null; + &null;&null;&null; + + +
+
- &com.variant-arith; -
-
+ &com.variant-arith; +
+
+ - - - variant_int - - Returns the integer portion of a variant - - - - Description - - mixedvariant_int - mixedvariant - + + + variant_int + Returns the integer portion of a variant + + + Description + + mixedvariant_int + mixedvariant + - - If variant 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 - variant. - + + If variant 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 + variant. + - - See also variant_fix, - variant_round, floor, - ceil, - round. - + + See also variant_fix, + variant_round, floor, + ceil, + round. + - &com.variant-arith; + &com.variant-arith; - - + + + - - - variant_mod - - Divides two variants and returns only the remainder - - - - Description - - mixedvariant_mod - mixedleft - mixedright - + + + variant_mod + Divides two variants and returns only the remainder + + + Description + + mixedvariant_mod + mixedleft + mixedright + - - Divides left by right and - returns the remainder. - + + Divides left by right and + returns the remainder. + - - See also variant_div, - variant_idiv. - + + See also variant_div, + variant_idiv. + - &com.variant-arith; - - + &com.variant-arith; + + + - - - variant_mul - - multiplies the values of the two variants and returns the result - - - - Description - - mixedvariant_mul - mixedleft - mixedright - + + + variant_mul + multiplies the values of the two variants and returns the result + + + Description + + mixedvariant_mul + mixedleft + mixedright + - - Multiplies left by right and - returns the result, subject to the following rules: - - - Variant Multiplication Rules - - - - If - Then - - - - - Both expressions are of the string, date, character, boolean type - Multiplication - - - One expression is a string type and the other a - character - Multiplication - - - One expression is numeric and the other is a string - Multiplication - - - Both expressions are numeric - Multiplication - - - Either expression is NULL - NULL is returned - - - Both expressions are empty - Empty string is returned - - - -
-
- - - Boolean values are converted to -1 for &false; and 0 for &true;. - + + Multiplies left by right and + returns the result, subject to the following rules: - - See also variant_div, - variant_idiv. - + + Variant Multiplication Rules + + + + If + Then + + + + + Both expressions are of the string, date, character, boolean type + Multiplication + + + One expression is a string type and the other a + character + Multiplication + + + One expression is numeric and the other is a string + Multiplication + + + Both expressions are numeric + Multiplication + + + Either expression is NULL + NULL is returned + + + Both expressions are empty + Empty string is returned + + + +
+
- &com.variant-arith; -
-
+ + Boolean values are converted to -1 for &false; and 0 for &true;. + + + + See also variant_div, + variant_idiv. + + + &com.variant-arith; +
+
+ - - - variant_neg - - Performs logical negation on a variant - - - - Description - - mixedvariant_neg - mixedvariant - + + + variant_neg + Performs logical negation on a variant + + + Description + + mixedvariant_neg + mixedvariant + - - Performs logical negation of variant and returns - the result. - + + Performs logical negation of variant and returns + the result. + - &com.variant-arith; - - + &com.variant-arith; + + + - - - variant_not - - Performs bitwise not negation on a variant - - - - Description - - mixedvariant_not - mixedvariant - + + + variant_not + Performs bitwise not negation on a variant + + + Description + + mixedvariant_not + mixedvariant + - - Performs bitwise not negation on variant and - returns the result. If variant is &null;, the - result will also be &null;. - + + Performs bitwise not negation on variant and + returns the result. If variant is &null;, the + result will also be &null;. + - &com.variant-arith; - - + &com.variant-arith; + + + - - - variant_or - - Performs a logical disjunction on two variants - - - - Description - - mixedvariant_or - mixedleft - mixedright - - - Performs a bitwise OR operation, according to the following truth table; - note that this is slightly different from a regular OR operation. - - Variant OR Rules - - - - If left is - If right is - then the result is - - - - &true;&true;&true; - &true;&false;&true; - &true;&null;&true; - &false;&true;&true; - &false;&false;&false; - &false;&null;&null; - &null;&true;&true; - &null;&false;&null; - &null;&null;&null; - - -
-
- - See also variant_and, - variant_xor. - - &com.variant-arith; -
-
+ + + variant_or + Performs a logical disjunction on two variants + + + Description + + mixedvariant_or + mixedleft + mixedright + + + Performs a bitwise OR operation, according to the following truth table; + note that this is slightly different from a regular OR operation. + + Variant OR Rules + + + + If left is + If right is + then the result is + + + + &true;&true;&true; + &true;&false;&true; + &true;&null;&true; + &false;&true;&true; + &false;&false;&false; + &false;&null;&null; + &null;&true;&true; + &null;&false;&null; + &null;&null;&null; + + +
+
+ + See also variant_and, + variant_xor. + + &com.variant-arith; +
+
+ - - - variant_pow - - Returns the result of performing the power function with two variants - - - - Description - - mixedvariant_pow - mixedleft - mixedright - + + + variant_pow + Returns the result of performing the power function with two variants + + + Description + + mixedvariant_pow + mixedleft + mixedright + - - Returns the result of left to the power of - right. - + + Returns the result of left to the power of + right. + - - See also pow. - + + See also pow. + - &com.variant-arith; - - + &com.variant-arith; + + + - - - variant_round - - Rounds a variant to the specified number of decimal places - - - - Description - - mixedvariant_round - mixedvariant - intdecimals - + + + variant_round + Rounds a variant to the specified number of decimal places + + + Description + + mixedvariant_round + mixedvariant + intdecimals + - - Returns the value of variant rounded to - decimals decimal places. - + + Returns the value of variant rounded to + decimals decimal places. + - - See also round. - + + See also round. + - &com.variant-arith; - - + &com.variant-arith; + + + - - - variant_set_type - - Convert a variant into another type "in-place" - - - - Description - - voidvariant_set_type - variantvariant - inttype - + + + variant_set_type + Convert a variant into another type "in-place" + + + Description + + voidvariant_set_type + variantvariant + inttype + - - This function is similar to variant_cast except that - the variant is modified "in-place"; no new variant is created. The - parameters for this function have identical meaning to those of - variant_cast. - + + This function is similar to variant_cast except that + the variant is modified "in-place"; no new variant is created. The + parameters for this function have identical meaning to those of + variant_cast. + - - See also variant_cast. - + + See also variant_cast. + - - + + + - - - variant_set - - Assigns a new value for a variant object - - - - Description - - voidvariant_set - variantvariant - mixedvalue - + + + variant_set + Assigns a new value for a variant object + + + Description + + voidvariant_set + variantvariant + mixedvalue + - - Converts value to a variant and assigns it to the - variant object; no new variant object is created, - and the old value of variant is freed/released. - + + Converts value to a variant and assigns it to the + variant object; no new variant object is created, + and the old value of variant is freed/released. + - - + + + - - - variant_sub - - subtracts the value of the right variant from the left variant value and returns the result - - - - Description - - mixedvariant_sub - mixedleft - mixedright - + + + variant_sub + subtracts the value of the right variant from the left variant value and returns the result + + + Description + + mixedvariant_sub + mixedleft + mixedright + - - Subtracts right from left using - the following rules: + + Subtracts right from left using + the following rules: - - Variant Subtraction Rules - - - - If - Then - - - - - Both expressions are of the string type - Subtraction - - - One expression is a string type and the other a - character - Subtraction - - - One expression is numeric and the other is a string - Subtraction. - - - Both expressions are numeric - Subtraction - - - Either expression is NULL - NULL is returned - - - Both expressions are empty - Empty string is returned - - - -
-
- - - See also variant_add. - + + Variant Subtraction Rules + + + + If + Then + + + + + Both expressions are of the string type + Subtraction + + + One expression is a string type and the other a + character + Subtraction + + + One expression is numeric and the other is a string + Subtraction. + + + Both expressions are numeric + Subtraction + + + Either expression is NULL + NULL is returned + + + Both expressions are empty + Empty string is returned + + + +
+
- &com.variant-arith; -
-
+ + See also variant_add. + + + &com.variant-arith; +
+
+ - - - variant_xor - - Performs a logical exclusion on two variants - - - - Description - - mixedvariant_xor - mixedleft - mixedright - + + + variant_xor + Performs a logical exclusion on two variants + + + Description + + mixedvariant_xor + mixedleft + mixedright + - - Performs a logical exclusion, according to the following truth table: - - Variant XOR Rules - - - - If left is - If right is - then the result is - - - - &true;&true;&false; - &true;&false;&true; - &false;&true;&true; - &false;&false;&false; - &null;&null;&null; - - -
-
- - See also variant_and, - variant_or. - - &com.variant-arith; + + Performs a logical exclusion, according to the following truth table: + + Variant XOR Rules + + + + If left is + If right is + then the result is + + + + &true;&true;&false; + &true;&false;&true; + &false;&true;&true; + &false;&false;&false; + &null;&null;&null; + + +
+
+ + See also variant_and, + variant_or. + + &com.variant-arith; -
-
+
+