Re: Autoboxing in PHP
| From: | Benjamin Eberlei | Date: | Tue, 04 May 2010 14:28:46 +0000 |
| Subject: | Re: Autoboxing in PHP | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48199@lists.php.net to get a copy of this message | ||
Should'nt any autobox callback should not only recieve the value to be
autoboxed,
but also the context information? I.e. the method name to be called
on the variable? otherwise you cannot decide between different behaviours.
Also i wouldn't know how to have an autobox callback not to accept the
value, return false?
On Tue, 4 May 2010 16:12:22 +0200, Etienne Kneuss <webmaster@colder.ch>
wrote:
> Hi,
>
> On Tue, May 4, 2010 at 5:48 AM, Moriyoshi Koizumi <mozo@mozo.jp> wrote:
>> Hey,
>>
>> Just to let you know about a new RFC for adding autoboxing feature in
>> PHP.
>> Look at http://wiki.php.net/rfc/autoboxing .
>
>
> It looks like a very interesting idea. However, I believe that we
> should learn from the __autoload experience: It does not cope well
> with multiple projects. I'd rather have register_autoboxer($callback)
> or even register_autoboxer("type", $callback); for instance, so that
> many projects could have their own autoboxer.
>
> Best,
>
>>
>> Regards,
>> Moriyoshi
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
> --
> Etienne Kneuss
> http://www.colder.ch