# FROM: [EMAIL PROTECTED]
# He couldn't mail to the list himself.

Marcus,
  sorry for not posting to the NG but my email client at work (Lookout
Express) is acting funny. feel free to post this to the NG as a point of
reference. the one question/concern i have with the patch is consistency
with the new read_dimension/write_dimension object handlers. seems like
it would have a bit of the WTF factor on the end user side if the
read_dimension handler and get_properties handlers return different
results. in other words, s/he can use array_* functions on the object, but
normal indexing may not work as expected.

  as an example, i have a UnicodeString class which uses the dimension
handlers to return a Unicode codepoint at a given offset in the string.
this takes only numeric indices. in addition i have a "length" property
which is returned by the get_properties handler.

  do you see a problem in this scenario ? or do we request extension writers
to support something like $myUnicodeString["length"] in the read_dimension
handler as a matter of consistency (i would hope not)?

  or maybe we've come to the logical conclusion of trying to treat an object
as an array in the first place.

l0t3k


Friday, September 19, 2003, 1:18:53 PM, you wrote:

> Hello internals,

> IIRC it was intended to use object properties as arrays. Currently most
> array_*() functions do explicitly check for IS_ARRAY. The patch below now
> enables objects in nearly all array_*() functions. The contray of such an
> approach is that it would allow to access/modify protected and private
> properties. But for some functions we do it already so we need to find a
> solution for that sooner or later independantly from this patch.

> Any thoughts?

> http://marcus-boerger.de/php/ext/standard/php-array-20030918.diff.txt

> -- 
> Best regards,
>  Marcus                          mailto:[EMAIL PROTECTED]




-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to