Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62919 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51405 invoked from network); 9 Sep 2012 13:51:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2012 13:51:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.170 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.223.170 mail-ie0-f170.google.com Received: from [209.85.223.170] ([209.85.223.170:63360] helo=mail-ie0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/E4-06600-1EE9C405 for ; Sun, 09 Sep 2012 09:51:29 -0400 Received: by ieak14 with SMTP id k14so1825831iea.29 for ; Sun, 09 Sep 2012 06:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=oP3XONvwm8tC8tfbpPbC4zC3FzufhzhM5AmDNTCA82c=; b=ejWDDrKVnx6QdjZpxUeBs0Hl3bV/J7J5mCK9RqI9ZtpdOFsz/E8q0ouGvBCYdCpUxv RVsgqjryLJ7iZCyGsLQinsFhSO6IaHaKXvINOlETHRpuqyOvCUvagXtpzCe5wWUY2QD0 ux/V6cEi520jusWQZxrMXloPpiRUdjs6p8DfOCvXO2MjQUpOCTUEyewyQSrj9Mud7WXM EFNGMXR/pXtuOw8w3WWinWqhHgeIFtmyD/v4nz38Im6Uu61Jtln7b2QtkNtqYNOaB2c+ auR3pmKT5juPAeHWe2xVNtnI9cm4bXeKmKHOb2D89aepanBo6oLvFnBk2bdOiseyjEbB W5YQ== MIME-Version: 1.0 Received: by 10.50.207.8 with SMTP id ls8mr4180044igc.22.1347198686120; Sun, 09 Sep 2012 06:51:26 -0700 (PDT) Received: by 10.64.0.108 with HTTP; Sun, 9 Sep 2012 06:51:26 -0700 (PDT) In-Reply-To: References: <1347177097.6077.82.camel@lat17.home.bof.de> <8A4F4A9D-C994-4CC1-ADF5-4779C600583D@schlueters.de> Date: Sun, 9 Sep 2012 14:51:26 +0100 Message-ID: To: =?ISO-8859-1?Q?Johannes_Schl=FCter?= Cc: Sherif Ramadan , Patrick Schaaf , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=14dae93404a920cb0604c9452342 Subject: Re: [PHP-DEV] get_class_vars() returned information ORDER From: dragoonis@gmail.com (Paul Dragoonis) --14dae93404a920cb0604c9452342 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 wro= te: > On Sun, Sep 9, 2012 at 7:52 AM, Johannes Schl=FCter > 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 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 > > --14dae93404a920cb0604c9452342--