Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53028 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74020 invoked from network); 6 Jun 2011 14:34:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2011 14:34:06 -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.170 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.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:60998] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/10-06642-A55ECED4 for ; Mon, 06 Jun 2011 10:34:04 -0400 Received: by mail-wy0-f170.google.com with SMTP id 34so3227295wyb.29 for ; Mon, 06 Jun 2011 07:34:01 -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=ek08IGjRTMsYhL9m0Vvi+53yYpWEEcddZf8a0Drnaro=; b=RKC+R2EqIMh12JJ5WezvL17Ol6BrXqCMcu5sjdiS6j9XiOpdS+kfjeucvyNgD2kZH8 npAOyIz3bHd0W26mYY9zKvJ1bSr899ndirLUwMztaLTez/nDL0oRGu8hJdsDadC+T3tM 0o3e77Ci4qHhSer4ud2J39626jcYbPNTiB3GA= 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=ckNjhmbIiUJROcEccucnSsXAzlewrJXSUCw8GN58qBviiO1SVq4laHTBycEXL+KFzC i2yOmUjN23ISwx6Eo9iqnv1CHXFeryNfHnyHKaXkCaoFqukHJof5Xvypp/dTSSkbCHGG RkLv3dV0Qqb3kCTSVEvraGRyFfBoqHEPJHByo= MIME-Version: 1.0 Received: by 10.216.230.213 with SMTP id j63mr2610610weq.20.1307370841499; Mon, 06 Jun 2011 07:34:01 -0700 (PDT) Received: by 10.216.50.212 with HTTP; Mon, 6 Jun 2011 07:34:01 -0700 (PDT) In-Reply-To: References: Date: Mon, 6 Jun 2011 16:34:01 +0200 Message-ID: To: Felipe Pena Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] $arr = array('Hello', 'world'); $arr(); From: hannes.magnusson@gmail.com (Hannes Magnusson) On Sun, Jun 5, 2011 at 17:52, Felipe Pena wrote: > Hi all, > Reading our bug tracker I noticed a good feature request [1] from 2009 which > points to an interesting feature that I think makes sense for us, since we > are now working with $f() using objects and strings, and the array('class', > 'method') is an old known for call_user_func()-like functions. I like it. I also think we should implement "callable" typehint. A lot of framworks are now adopting Closure as a typehint for that, which is annoying due to the fact you have to wrap anything else in a closure just to pass that typehint. Essentially the callable typehint would be the same as is_callable($arg, true); That means I can pass in any string with a function name, an array (with class+methodname), and a closure. -Hannes