Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53079 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81653 invoked from network); 6 Jun 2011 20:49:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 20:49:03 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 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: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:60697] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/30-23189-E3D3DED4 for ; Mon, 06 Jun 2011 16:49:03 -0400 Received: by wwd20 with SMTP id 20so3945708wwd.11 for ; Mon, 06 Jun 2011 13:48:59 -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; bh=seA7XL2fj0HhDR53k4WqynwEmr1zWRteDR4BTZV0MSc=; b=Evuk786nInNrC2ewY3qZaVx9fsEWN1GrwC9B+ivw4t875mdcblSK5rOHR1GsX45z8D U96eHFNe4p+Zk5clzFmjHMMXbMg1U2J2Z09gamsWv+S/sGBCsZoXamOfA69QI1PxkJQ+ MVQgI32UyTLULXOEbprDsenZKd7tEn58mE6LU= 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; b=fBvg3sdaoK7LqXB0LtWUrkZ3zYnp0pZ+4CGJ8Nbl7t/f/WIE3FRDy0t7HoVPnGr2yv 1TE/wAt6pF+k6Ms4CwO1LxhX+VeRk9iDhQkHDwBjXiKvViteo73uGCAoBF2E5x8zLEVP uRu5f7j9vnB9VKYJsYJtx2iRm29z3obF1Voow= MIME-Version: 1.0 Received: by 10.216.230.213 with SMTP id j63mr2958053weq.20.1307393339715; Mon, 06 Jun 2011 13:48:59 -0700 (PDT) Received: by 10.216.50.212 with HTTP; Mon, 6 Jun 2011 13:48:59 -0700 (PDT) In-Reply-To: <4DED3A29.1090209@sugarcrm.com> References: <4DED3A29.1090209@sugarcrm.com> Date: Mon, 6 Jun 2011 22:48:59 +0200 Message-ID: To: Stas Malyshev Cc: PHP Development Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Callable typehint From: hannes.magnusson@gmail.com (Hannes Magnusson) On Mon, Jun 6, 2011 at 22:35, Stas Malyshev wrote: > Hi! > >> See attached patch+phpt; Any objections to include it in 5.4? > > Yes, same objections as for other static typing. > That was totally not the purpose of this, and I don't quite understand how you made the connection. Like I mentioned in the other thread (which I probably should had repeated here), a lot of libs/frameworks are using the 'Closure' typehint for callbacks. The problem with that is a function name as a string and array("classname", "functionname") are considered is_callable(). To get through the intentions of the Closure hint, I would have to wrap the actual callback in a closure - which doesn't make any sense. -Hannes