Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60939 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92222 invoked from network); 22 Jun 2012 19:05:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2012 19:05:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gh0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:39109] helo=mail-gh0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/EE-21324-CF1C4EF4 for ; Fri, 22 Jun 2012 15:05:33 -0400 Received: by ghbg2 with SMTP id g2so2125018ghb.29 for ; Fri, 22 Jun 2012 12:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=4+pZR0xNIEwrzx0HWmFg9ozK9lhf5Wp33OXWwGxOxOo=; b=h6mK39C/a/MqamYiau7TEHaBW+vxqQnYdzebkbfiJR2Rx5/EO4pdefsmUNNEe4TDbD ST2OVYglVDzo5cYwNiprt2FZNEXFcz8CpM0hiNPCT0DBhCvhZFsgpCbv4NBHqnv/Ol0m y89YLBem5y27OjZDqZ2PBwmBozUor6HigGWCQSKNwg3pzwkBZzdGvNU0ozEKVszbBPNP jLvcJJV4sVo4TdDxMLej9LBT6QNrc4HpvY+Jt58hteqhVkm4cCKHpw2KkBIYSKYHRJEw zMwoCr2Eqqj56wpUrQwZZ78wBtrUYFmgI8+bTgVOsrcw9iIu4QxNVZJnrz+WdYnV6hwf 88Xg== Received: by 10.42.108.135 with SMTP id h7mr891418icp.20.1340391929364; Fri, 22 Jun 2012 12:05:29 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.64.23.74 with HTTP; Fri, 22 Jun 2012 12:04:49 -0700 (PDT) In-Reply-To: References: Date: Fri, 22 Jun 2012 21:04:49 +0200 X-Google-Sender-Auth: y5o1KmF4kTyvK5BfPHQv6o4ttTE Message-ID: To: Laruence Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Add parameter user_only to get_declared_classes(interfaces/traits) From: jpauli@php.net (jpauli) On Fri, Jun 22, 2012 at 6:25 PM, Laruence wrote: > Hi internalers: > > =A0 =A0 =A0there comes a FR, #62343 https://bugs.php.net/bug.php?id=3D623= 43 > > =A0 =A0 =A0the bug self is about class alias, =A0but it also metioned a n= ew > parameter $user_only to get_declared_classes. > > =A0 =A0 =A0the FR makes sense to me, =A0for now, =A0get_defined_functions= 's > return will points which functions are internal, and which is user > defined. > > =A0 =A0 =A0but get_declared_classes etc doesn't. > > =A0 =A0 =A0so I made a patch > https://bugs.php.net/patch-display.php?bug_id=3D62343&patch=3Dbug62343.ph= pt&revision=3Dlatest > > =A0 =A0 =A0yes, the patch have some room for improving, =A0like promote t= he > condition (ce->type =3D=3D ZEND_USER_CLASS) out of the iterating :) > > =A0 =A0 =A0for now, I just what to see what do you think about this idea? > :) =A0(hope I made my point clear) > Why not use something like get_defined_functions()'s return : a double array of [internal] =3D> array, [user] =3D> array ? It would just make the get_defined_functions()'s API more consistent IMO. We could embrace the [ bool $categorize =3D false ] API from get_defined_constants() as well , the goal would be to take this bug as an entry point to standardize those functions' API without BBC Julien.P