Re: [PHP4BETA] Small question about COM syntax
| From: | Taras Tielkes | Date: | Sun, 21 Nov 1999 03:32:55 +0000 |
| Subject: | Re: [PHP4BETA] Small question about COM syntax | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6612@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: <rubys@us.ibm.com>
To: <php4beta@lists.php.net>
Sent: Sunday, November 21, 1999 3:30 AM
Subject: Re: [PHP4BETA] Small question about COM syntax
> "Taras Tielkes" writes:
> > $test = new COM("SmallCls");
> > print $test->getClass()->toString(); // Gives parse error
>
> This appears to be a limitation of the zend parser. Playing around with
> Java:
>
> $test = new Java("java.util.Date");
> print $test->getClass()->toString(); // Gives parse error
> print $test->class->toString(); // Sat Nov 20 21:26:00 EST 1999
> $temp = $test->class;
> print $temp->toString(); // class java.util.Date
>
> Only the last answer is correct. The middle one looks like a bug. My
> preference would be that the first one be treated like a bug too.
>
> P.S. Your example looks suspiciously like Java to me...
It is a normal Java class in /java/trustlib and registered into COM by
javareg. The MS JVM will automagically wrap it in IDispatch(Ex) and some
other interfaces.
Regards,
Taras