# Perl extension

- Thread: https://externals.io/message/8359
- Original archive: https://news-web.php.net/php.internals/8359
- Started by Daniel Daley on 2004-03-03T22:04:01+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8359 — Daniel Daley — 2004-03-03T22:04:01+00:00

URL: https://externals.io/message/8359#8359

>
>
>Any ideas or suggestions? It would also be cool if people could mess around 
>with it a bit and give us some feedback.
>  
>

I already have an instance where this has been extremely useful. My 
current project required me to work with some third party com objects. A 
couple of them required me to set properties with arguments which as far 
as I can tell hasn't been implemented yet for php. I compiled the 
extension on my w2k3/IIS box with the latest snaps release of php5 and 
it worked great. I was able to load in the Win32::OLE extension and 
manipulate those objects. Without this I would have probably ended up 
doing some bungled php -> perl -> php variable passing solution, thanks 
much!

--Dan

---

## #8409 — Wez Furlong — 2004-03-06T18:08:30+00:00

URL: https://externals.io/message/8359#8409 · In reply to: #8359

So you totally missed the completely new COM and .Net support in PHP 5 ? :-)

--Wez.

----- Original Message ----- 
From: "Daniel Daley" <dan@chameleoncode.jp>
To: <internals@lists.php.net>
Sent: Wednesday, March 03, 2004 10:04 PM
Subject: Re: [PHP-DEV] Perl extension


> > […]
around
> > […]
>
> I already have an instance where this has been extremely useful. My
> current project required me to work with some third party com objects. A
> couple of them required me to set properties with arguments which as far
> as I can tell hasn't been implemented yet for php. I compiled the
> extension on my w2k3/IIS box with the latest snaps release of php5 and
> it worked great. I was able to load in the Win32::OLE extension and
> manipulate those objects. Without this I would have probably ended up
> doing some bungled php -> perl -> php variable passing solution, thanks
> much!
>
> --Dan

---

## #8416 — Daniel Daley — 2004-03-07T11:35:53+00:00

URL: https://externals.io/message/8359#8416 · In reply to: #8409

Wez Furlong wrote:

>So you totally missed the completely new COM and .Net support in PHP 5 ? :-)
>
>  
>

As far as I've seen the new COM support has yet to allow for setting 
properties with arguments and as the equivalent asp syntax is not valid 
php syntax I'm pretty sure it would require a new function in order to 
implement it.

Example ASP syntax:
Set comobj = Server.CreateObject("MyComLib.ComLib")
comobj.Property("Record") = "otherdata"

PHP Syntax:
$comobj = &new COM('MyComLib.ComLib');
$comobj->Property("Record") = "otherdata";            // This will fail

The last line will fail with PHP Fatal error: Can't use method return 
value in write context
If you do know of a way to do this with native PHP COM support I'd love 
to use it instead.

Thanks,

--Dan

---

## #8417 — Wez Furlong — 2004-03-07T13:27:18+00:00

URL: https://externals.io/message/8359#8417 · In reply to: #8416

Ahh, this problem.

Andi: remember that we discussed this in the past?
Is a solution possible using the get_property_ptr object
handlers, or not possible at all?

--Wez.

----- Original Message ----- 
From: "Daniel Daley" <dan@chameleoncode.jp>
To: "Wez Furlong" <wez@thebrainroom.com>; <internals@lists.php.net>
Sent: Sunday, March 07, 2004 11:35 AM
Subject: Re: [PHP-DEV] Perl extension


> Wez Furlong wrote:
>
> > […]
:-)
> > […]
>
> As far as I've seen the new COM support has yet to allow for setting
> properties with arguments and as the equivalent asp syntax is not valid
> php syntax I'm pretty sure it would require a new function in order to
> implement it.
>
> Example ASP syntax:
> Set comobj = Server.CreateObject("MyComLib.ComLib")
> comobj.Property("Record") = "otherdata"
>
> PHP Syntax:
> $comobj = &new COM('MyComLib.ComLib');
> $comobj->Property("Record") = "otherdata";            // This will fail
>
> The last line will fail with PHP Fatal error: Can't use method return
> value in write context
> If you do know of a way to do this with native PHP COM support I'd love
> to use it instead.
>
> Thanks,
>
> --Dan
