PHP and COM
Posted on 2003-11-11
I'm trying to develop the COM library with Delphi 7, but I have problems using it in PHP. So far, I have added two COM objects "Domains" (collection) and "Domain". When I launch the simple PHP script below, the exception occurs, and window popups, asking to send the error report to Microsoft.
$domains = new COM("MyLib.Domains");
$domain = $domains->Item(1);
The ASP analog below, in VBScript works perfect
set Domains = Server.CreateObject("MyLib.Domains")
set Domain = Domains(1)
One interesting thing: when in Delphi I rename property "Domain.Name" to "Domain.DomainName" suddently it starts to work in PHP, but when I start to add other new properties and methods - they fall again.
I have tested it with PHP4.2.1, PHP4.3.2 and PHP5.0.0beta.
Maybe I should take into consideration some important details when I'm developing COM objects with Delphi, or is this is a PHP bug?