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

search for in the

variant_abs> <com_release
Last updated: Sun, 25 Nov 2007

view this page in

com_set

(PHP 4)

com_set — Assigns a value to a COM component's property

Description

void com_set ( resource $com_object , string $property , mixed $value )

Sets the value of the property of the COM component referenced by com_object . Returns the newly set value if succeeded, FALSE on error.

Example#1 Don't use com_set(), use OO syntax instead

<?php 
// do this
$obj->property $value;
// instead of this:
com_set($obj'property'$value);
?>

Note: This function does not exist in PHP 5; instead, you should use the regular and more natural OO syntax to access properties or call methods.



add a note add a note User Contributed Notes
com_set
dan at kuykendall dot org
15-Aug-2002 07:38
This should also work using the newer OOP style that is still undocumented.

<?php
$obj
= new COM('Some.app');
$obj->somevar = 'somevalue';
?>

variant_abs> <com_release
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites