Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53189 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48434 invoked from network); 7 Jun 2011 23:40:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2011 23:40:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 unknown Received: from [217.114.211.66] ([217.114.211.66:60386] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/32-50253-5C6BEED4 for ; Tue, 07 Jun 2011 19:39:50 -0400 Received: from [192.168.2.230] (ppp-93-104-51-187.dynamic.mnet-online.de [93.104.51.187]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 3D173725C9; Wed, 8 Jun 2011 01:39:46 +0200 (CEST) To: Stas Malyshev Cc: Matthew Weier O'Phinney , internals@lists.php.net In-Reply-To: <4DEE782E.1020605@sugarcrm.com> References: <4DED3D5B.6030307@oracle.com> <4DEE782E.1020605@sugarcrm.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 08 Jun 2011 01:39:41 +0200 Message-ID: <1307489981.23373.31.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Callable type From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Tue, 2011-06-07 at 12:12 -0700, Stas Malyshev wrote: > Hi! > > > https://wiki.php.net/rfc/callable > > It is good there's an RFC. However it seems to lack code examples. I > understand it may be obvious to the proposers how it looks like, but > it'd be nice to have the actual example there as it is done nearly > everywhere else. The RFC is missing information about what happens in codebases which already have a "callable" type declared. Will that be prevented or will they hit a runtime error? ("callable expected, callable type found") What about default values? Will function foo(callback $cb = 'strpos') { } be valid? The information on reflection is limited. what shall Reflection::Parameter::getTypehint() return? Will that method allow to differ between a class type and this "magic"? What about ARGINFO? Will internal functions be able to define this type via ARGINFO? How will this be reported in `php --rf function`? johannes