Re: [PHP-DEV] Re: [Proposal] Struct Data Types

2019-03-16 Thread Rowan Collins
On 16 March 2019 05:18:55 GMT+00:00, Larry Garfield wrote: >In general, though, I think beefing up objects to be "more usable as >structs" (locked against dynamic properties, getter/setter methods, >possibly some improved tooling for with*()-style behavior, etc.) is the >more sustainable long-ter

Re: [PHP-DEV] [Proposal] Struct Data Types

2019-03-16 Thread Rowan Collins
On 15 March 2019 15:26:27 GMT+00:00, Nikita Popov wrote: >On Fri, Mar 15, 2019 at 4:16 PM Levi Morrison wrote: > >> Personally, I think pass by-value with copy-on-write semantics like >> arrays is the sweet spot. Mutability is fine if it is localized. >> > >If we introduce something like this, I

Re: [PHP-DEV] Offset-only results from preg_match

2019-03-16 Thread Markus Fischer
On 14.03.19 20:33, C. Scott Ananian wrote: ps. more ambitious would be to introduce a new "substring" type, which would share the allocation of a parent string with its own offset and length fields. That would probably be as invasive as the ZVAL_INTERNED_STR type, though -- a much much bigger pr