Re: [PHP-DEV] [PATCH] string_offset access optimization

2010-07-16 Thread Dmitry Stogov
Hi Stas, On 07/16/2010 11:47 AM, Stas Malyshev wrote: Hi! $str = "abs"; var_dumo($str[1][0]); I think it's not a problem at all. "b" makes sense because "abs"[1] -> "b" and "b"[0] -> "b". Totally makes sense, but it'd be a bit strange that $str[1][0] works but $str[1][0] = "a" does not. $

Re: [PHP-DEV] [PATCH] string_offset access optimization

2010-07-16 Thread Ferenc Kovacs
On Fri, Jul 16, 2010 at 9:47 AM, Stas Malyshev wrote: > Hi! > >> $str = "abs"; >> var_dumo($str[1][0]); >> >> I think it's not a problem at all. >> "b" makes sense because "abs"[1] ->  "b" and "b"[0] ->  "b". > > Totally makes sense, but it'd be a bit strange that $str[1][0] works but > $str[1][0]

Re: [PHP-DEV] [PATCH] string_offset access optimization

2010-07-16 Thread Stas Malyshev
Hi! $str = "abs"; var_dumo($str[1][0]); I think it's not a problem at all. "b" makes sense because "abs"[1] -> "b" and "b"[0] -> "b". Totally makes sense, but it'd be a bit strange that $str[1][0] works but $str[1][0] = "a" does not. -- Stanislav Malyshev, Software Architect SugarCRM: htt

Re: [PHP-DEV] [PATCH] string_offset access optimization

2010-07-15 Thread Felipe Pena
Hi Dmitry, 2010/7/15 Dmitry Stogov > Hi, > > Recently I noticed that reading of string offset is performed in two steps. > At first special string_offset variant of temporary_variable is created in > zend_fetch_dimension_address_read() and then the real string value is > created in _get_zval_ptr

[PHP-DEV] [PATCH] string_offset access optimization

2010-07-15 Thread Dmitry Stogov
Hi, Recently I noticed that reading of string offset is performed in two steps. At first special string_offset variant of temporary_variable is created in zend_fetch_dimension_address_read() and then the real string value is created in _get_zval_ptr_var_string_offset(). I think we can create