Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85236 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44699 invoked from network); 19 Mar 2015 19:44:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2015 19:44:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=dennis@birkholz.biz; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dennis@birkholz.biz; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain birkholz.biz does not designate 144.76.185.252 as permitted sender) X-PHP-List-Original-Sender: dennis@birkholz.biz X-Host-Fingerprint: 144.76.185.252 mx01.nexxes.net Received: from [144.76.185.252] ([144.76.185.252:55019] helo=mx01.nexxes.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/FA-25408-7072B055 for ; Thu, 19 Mar 2015 14:44:09 -0500 Received: from [137.226.183.192] (ip3192.saw.rwth-aachen.de [137.226.183.192]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: db220660-p0g-1@packages.nexxes.net) by mx01.nexxes.net (Postfix) with ESMTPSA id 03ABD482464 for ; Thu, 19 Mar 2015 20:44:04 +0100 (CET) Message-ID: <550B2704.7010502@birkholz.biz> Date: Thu, 19 Mar 2015 20:44:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54BEC072.5000507@mabe.berlin> <54C28B63.1040506@gmail.com> <54C2E405.4090204@gmail.com> <550B1DFC.9060704@birkholz.biz> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Inconsistencies in callable, call_user_func and direct variable calls From: dennis@birkholz.biz (Dennis Birkholz) Hi, Am 19.03.2015 um 20:26 schrieb Levi Morrison: > On Thu, Mar 19, 2015 at 1:05 PM, Dennis Birkholz wrote: >> Hi, >> >> Am 19.03.2015 um 17:27 schrieb Sebastian B.-Hagensen: >>> Another way to unify array and string callback may be to use the >>> callable syntax and have it return a closure: >>> callable('strlen'); >>> callable($object, $methodName); >>> callable('class', 'staticMethod') >> >> but before that happens, we should make closures serializable. > What does closures being serializable have to do with this feature? If you replace the array($object, 'method') syntax by callable($object, 'method') which returns a closure, you can not serialize callables any more which is currently possible. Before we replace working language features by closures we should update closures to be usable in all required situations. Greets Dennis