On Tuesday, 24 September 2024 at 14:24, Christoph M. Becker <cmbecke...@gmx.de> 
wrote:

> On 24.09.2024 at 14:18, Gina P. Banyard wrote:
> 
> > I would like to propose a short RFC about warning on conversions from 
> > resources to strings,
> > similar to what a conversion from array to string does.
> > 
> > Let me know what you think about it:
> > https://wiki.php.net/rfc/warn-resource-to-string
> 
> 
> The ssh2 wrappers[1] used to use this "feature". I'm not sure whether
> there is another way to accomplish the same now. If not, that should
> probably be done prior to emitting a warning for the resource to string
> conversion.
> 
> [1] https://www.php.net/manual/en/wrappers.ssh2.php

I guess that it could always use the integer representation of the resource.
Or, more sensibly, be converted to an opaque object that implements a 
__toString() method.

I have encountered some other issues in the engine exposed by this conversion,
the biggest one being array_diff/array_intersect, so I could also spend some 
time working on that extension.

Best regards,

Gina P. Banyard

Reply via email to