Re: [PHP-DEV] Tie'ing variables
[email protected] (Moriyoshi Koizumi)
| Newsgroups | php.dev |
|---|---|
| Message-ID | <[email protected]> |
George Schlossnagle <[email protected]> wrote: > Having this sort of functionaility in general would be great. I know > you can affect this with objects via overload, but it is useful for > scalars and arrays and streams as well. It is pretty 'magical' though. Then how about allowing access to object properties via square brackets like ECMA-Script? Though this will definitely add much more complexity to the Engine... Moriyoshi > George > > On Saturday, March 1, 2003, at 11:26 AM, Sterling Hughes wrote: > > > I was wondering if it might be possible to "tie" these arrays to a > > function (if you don't understand that, look at Perl for a definition). > > One could populate them as an overloaded object, and then array > > accesses > > would work - I guess. But I would prefer a cleaner mechanism.