Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63998 invoked from network); 25 Nov 2010 14:24:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2010 14:24:49 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:57358] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/B1-55895-0B17EEC4 for ; Thu, 25 Nov 2010 09:24:48 -0500 Received: by vws11 with SMTP id 11so370009vws.29 for ; Thu, 25 Nov 2010 06:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:reply-to :in-reply-to:references:from:date:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=uEHyczGROMh0SiZnIXLrhprTzxbTxufyUgglo/57hWY=; b=m8zEfRr6ZrPrfSXjybNEOySrv3D7KeMnZLn3GQnqqnb2CVVrowxFJuv8sj5T8Z+RYi qRz14GOuSvQe9oingFD/09zEsIM/HBtItHmnOnrnyZ9zdc36l+ZVVH9bNbJTqHOZi2sF 0TZ68D8qZW7w8jf9bM7bzUB7VAd5ARI59iWdU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=GQvMmUciO12YJ3g1ziBij3RJs2JFwbxWJSYDTpHFl0a+1lCkcj/2pzHK4D+VhUwHTQ pxDKj/QyeW3NaWiQiCUvVrfELcHUBh68qwUjVb8ajbIt2EPeDCBws+xKtyegJHWKVu8M 6laBfn7JrM4gf/KB1urTRXScYQDFCwMqovZvI= Received: by 10.229.192.76 with SMTP id dp12mr764426qcb.63.1290695085785; Thu, 25 Nov 2010 06:24:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.100.130 with HTTP; Thu, 25 Nov 2010 06:24:25 -0800 (PST) Reply-To: RQuadling@googlemail.com In-Reply-To: References: Date: Thu, 25 Nov 2010 14:24:25 +0000 Message-ID: To: Nathan Nobbe Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: Revise callback Psuedo-type to support new Closure class ? From: rquadling@gmail.com (Richard Quadling) On 24 November 2010 18:03, Nathan Nobbe wrote: > Ummm... never mind! > > Sorry for the noise! > > -nathan > > On Wed, Nov 24, 2010 at 11:00 AM, Nathan Nobbe wr= ote: > >> Hi all, >> >> I had a thought this morning and would like some feedback. =C2=A0Don't y= ou think >> it would make sense to allow the callback psuedo-type to also allow the = new >> Closure class to be an acceptable data type? =C2=A0A simple example that= would be >> nice to have working would be >> >> > $fClosure =3D function($val, $key) { >> =C2=A0 =C2=A0 echo "$key =3D> $val" . PHP_EOL; >> } >> >> $aNumbers =3D array(5, 4, 3, 2, 1); >> >> array_walk($aNumbers, $fClosure); >> ?> >> >> Thoughts ? >> >> -nathan >> > I bet you thought you had something there... Ha! It is a pity that the error is tagged as being on line 6 and not line 4. I can see why. It isn't an error until the first non ; following the closing brace (excluding comments). So ... $fn =3D function() // comment ; is valid. Having the error on the same line as the closing brace would be nice though= . Richard. --=20 Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY