Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53195 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5183 invoked from network); 8 Jun 2011 08:31:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jun 2011 08:31:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-yi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:50078] helo=mail-yi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/48-50253-E633FED4 for ; Wed, 08 Jun 2011 04:31:43 -0400 Received: by yih10 with SMTP id 10so111806yih.29 for ; Wed, 08 Jun 2011 01:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=F3WQy/j0Nui7xMOUTDPhZ+s5MWq66y10A6BaIURIbQw=; b=lG6ZR+P4RotYS5gCAG2ts5wRFAKyXLkdyV4r4P0CVX33dHMaDqOzZ5yhHwxdFD7ljb 6CBB1+8PzZuQDRM/TQArER7vkhzc/JGLXkmqsSm9CPBNYmYCGs5BlGNh/HpYNIO3aLkS xTvTs/puHNX2V/LOqUH1TT0IWS9VeqArEW44I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qv6+0XFlujzMby73FdlqNztSo3j3JEZN1b3jo7D8D8128jIb7CPERJSZVFfGctPNOt vHoDNCbC6uXXOMLSzxWGGxf2TQUI9+X9Iwh0Di8JNqv/8AlSVJ+6P+PbL0gsCH/62lwl D7dSh1Qi0YQB28V6YX6cOIaT//3fsZLgglJ7I= MIME-Version: 1.0 Received: by 10.236.185.3 with SMTP id t3mr2166554yhm.175.1307521899017; Wed, 08 Jun 2011 01:31:39 -0700 (PDT) Received: by 10.146.210.3 with HTTP; Wed, 8 Jun 2011 01:31:38 -0700 (PDT) In-Reply-To: <41.0E.50253.11B9EED4@pb1.pair.com> References: <4DED3D5B.6030307@oracle.com> <4DEE782E.1020605@sugarcrm.com> <7104F8AD-489E-4824-97AA-D9831FAB77AA@bitextender.com> <4DEE8ABB.8040503@sugarcrm.com> <7E4C6CB6-ED93-4BFC-87B8-94FDEF243896@bitextender.com> <17.29.50253.ACD8EED4@pb1.pair.com> <41.0E.50253.11B9EED4@pb1.pair.com> Date: Wed, 8 Jun 2011 10:31:38 +0200 Message-ID: To: "Matthew Weier O'Phinney" Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Callable type From: hannes.magnusson@gmail.com (Hannes Magnusson) We have the situation in the docs that parameters declared as arrays do not follow the typehinting rules, but parameters as class names do. Re-using the callback from the docs could get confusing when extensions start to typehint on it, but not the core.. I think there is a subtle difference between a callback, and a callable. In javascript for example, callback is something that is executed on certain events "onsuccess" is the typical example. There is nothing that says the callable parameter gets executed as a part of an event, and I think the default usecase would be to execute it right away (f.e. filtering data). I think I would prefer callable, but I could live with either. -Hannes On Tue, Jun 7, 2011 at 23:41, Matthew Weier O'Phinney wrote: > On 2011-06-07, dukeofgaming wrote: >> --0016e68ee3e4bc4b0e04a525bac6 >> Content-Type: text/plain; charset=3DISO-8859-1 >> Content-Transfer-Encoding: quoted-printable >> >> +1 for "callable", it is really more consistent. > > I was actually agreeing With David and Stas that "callback" was more > consistent, and casting my vote for that. > >> On Tue, Jun 7, 2011 at 3:44 PM, Matthew Weier O'Phinney < >> weierophinney@php.net> wrote: >> >> > On 2011-06-07, David Z=3DFClke wrote: >> > > On 07.06.2011, at 22:31, Stas Malyshev wrote: >> > > > > callback is callable, the opposite could not be true. =C2=A0a st= ring >> > > > > --or a closure-- is callable, but the string is not a callback >> > > > >> > > According to our docs, which were out there for years, it is. One of >> > > the main and widespread complaints about PHP is the lack of any syst= em >> > > in naming, design and documentation, it is sad to see how many peopl= e >> > > want to make it worse instead of making it better >> > > >> > > +1. I'm thinking it should be "callback", or the docs should be >> > > adjusted. "callable" arguably does make more sense, but either way, = it >> > > needs to be consistent, that's what matters most. >> > >> > Agreed, here. "callback" is the usage throughout the documentation to >> > refer to anything that passes is_callable(). > > -- > Matthew Weier O'Phinney > Project Lead =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| matthew@zend.com > Zend Framework =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| http://framework.zend.= com/ > PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >