On Sun, Sep 9, 2012 at 7:52 AM, Johannes Schlüter
<johan...@schlueters.de> wrote:
>
>
> On Sep 9, 2012, at 10:22, Sherif Ramadan <theanomaly...@gmail.com> wrote:
>>> I'm curious whether the ORDER of the class properties returned by
>>> get_class_vars(), is in some way guaranteed. I do not find mention of it
>>> in the documentation.
>>>
>>
>> The only real guarantee is that of how the class properties are stored
>> in the hashtable. get_class_vars() is essentially just reading from a
>> hashtable of class properties.
>
> There's no such guarantee. The fact that it is using a Hashtable which has an 
> order is an implementation detail. This might change (even though a change is 
> unlikely) The only promise of get_class_vars() is to return all.
>

Right, I should have said "there's no guarantee at all", but what I
was trying to say was that this isn't really by guarantee of
get_class_vars(). Just the fact that this particular implementation
detail is unlikely to change is what makes it a convenient side
effect.

Sorry, that was poorly worded.

> johannes
>

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

Reply via email to