Here is an example that works out of the box (with our simulation server):
$EasyDAClient = new COM("OPCLabs.EasyDAClient.5.0"); $ItemIds = new VARIANT(array("Simulation.Random", "Trends.Ramp (1 min)", "Trends.Sine (1 min)", "Simulation.Register_I4")); $Results = $EasyDAClient->ReadMultipleItems("", "OPCLabs.KitServer", $ItemIds); foreach ($Results as $X) print $X->Vtq->ToString()."";
It produces following output (e.g.):
1.25125888851588E-03 {VARTYPE(5)} @7/28/2010 6:13:40 PM; OPCQUALITY(192)
0.667287677526474 {VARTYPE(5)} @7/28/2010 6:13:40 PM; OPCQUALITY(192)
-0.867969703914737 {VARTYPE(5)} @7/28/2010 6:13:40 PM; OPCQUALITY(192)
0 {VARTYPE(3)} @7/28/2010 6:13:40 PM; OPCQUALITY(192)
This is with QuickOPC-COM 5.01.274.1, and PHP 5.2.12. There may be no one-line way to convert the resulting VT_ARRAY back to normal PHP array, but accessing the elements, and the use of 'foreach', is possible, so you can always convert it to anything you like, in a loop. I have searched the Web a little and assembled a list of related links, just in case:
www.mail-archive.com/php-bugs@...
www.colorpilot.com/blog/com-ar...
bugs.php.net/bug.php?id=39596
www.phpwelt.net/handbuecher/cz...
www.nme.at/download/phpcon02_m...
osdir.com/ml/php-windows/2010-...
<a href="
forums.devnetwork.net/viewtopic.php?f=14&t=3599" target="_blank" rel="nofollow">
forums.devnetwork.net/viewtopi...
www.colorpilot.com/pdfcreatorp...