Thanks Sherif and all, for your answers.
So I will not rely on the order returned by get_class_vars (or
get_class_methods), instead adding suitable code (actually
roughly one additional line per class involved) to define my
desired ordering by hand.
If you're curious, the use case I was thinking
On Tue, Sep 4, 2012 at 3:16 PM, Anthony Ferrara wrote:
> Hello all,
>
> I'm opening the vote for the simplified password hashing API indicated here:
>
> https://wiki.php.net/rfc/password_hash
>
I like the idea, but I don't understand why this isn't developed as an
extension first and then brough
Can we use reflection to inspect the properties in the order that they're
written, or the order that the parser found public/protected/private
keywords and properties.
Paul.
On Sun, Sep 9, 2012 at 1:10 PM, Sherif Ramadan wrote:
> On Sun, Sep 9, 2012 at 7:52 AM, Johannes Schlüter
> wrote:
> >
>
On Sun, Sep 9, 2012 at 7:52 AM, Johannes Schlüter
wrote:
>
>
> On Sep 9, 2012, at 10:22, Sherif Ramadan 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
Hi,
Am 09.09.2012 um 13:52 schrieb Johannes Schlüter :
[...]
> 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.
Or put
On Sep 9, 2012, at 10:22, Sherif Ramadan 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 store
On Sun, Sep 9, 2012 at 3:51 AM, Patrick Schaaf wrote:
> Hi,
>
> 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 st
Hi,
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.
I'm especially interested in the order of static class variables
returned.
Testing, using PHP 5.4.6, I find that there seems to be