Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80991 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59365 invoked from network); 22 Jan 2015 20:47:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2015 20:47:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.170 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.170 mail-pd0-f170.google.com Received: from [209.85.192.170] ([209.85.192.170:56317] helo=mail-pd0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/10-61273-3C161C45 for ; Thu, 22 Jan 2015 15:47:01 -0500 Received: by mail-pd0-f170.google.com with SMTP id p10so3836375pdj.1 for ; Thu, 22 Jan 2015 12:46:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=FXk/ZBfmdrG6fvVdsbtzvmrFIlwIfaeU8t4ttqVRhbQ=; b=XoAQocf5ECktNKQMIyMAj3VYnVDu2xg+k+tGB+lhyu3LkBjNhtGLtgP2PFSOq4ZXdf eHyT8iJDNVZ+0/sXPsoQI7tCU65YZysS8y2YZrWxZb0xT42x/HqbZ06ka4ZGVzKfJ8Qn uVsLP14ysv4OpctbhXl+dGcMjf5wUqmJ3yStObmCLkKJtA24kk4ELcN0fIrFNcA3GYVd gAWSf7LjYGMtQBn/U9oSNJEwQguy0wX7ufWLHzxuBcQ7Fy/+UtuOt4kqdNEWcfvZScN9 1E/19+DuPqhC1VExmOFCwvfGGZhpGdjo+KMIF6G3QnJ6sD7GrQCCnd0tiL4a7Yf51Q55 Eucw== X-Received: by 10.66.62.165 with SMTP id z5mr5233014par.91.1421959616613; Thu, 22 Jan 2015 12:46:56 -0800 (PST) Received: from Stas-Air.local ([208.66.31.10]) by mx.google.com with ESMTPSA id uc2sm2020817pbc.56.2015.01.22.12.46.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 12:46:56 -0800 (PST) Message-ID: <54C161BF.4090004@gmail.com> Date: Thu, 22 Jan 2015 12:46:55 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andrea Faulds , Adam Harvey CC: Marc Bennewitz , PHP internals , julien pauli References: <54BEC072.5000507@mabe.berlin> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Inconsistencies in callable, call_user_func and direct variable calls From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > It’s technically a 'language change’ and would affect the language > specification. That said, it seems rather “no-brainer”. I think it makes a lot of sense to have call_user_func() and $a() work identically. I'm not sure though if it should be done by adding 'foo::bar' to $a() or removing it from call_user_func(). Adding means stuff that wasn't callable before may be callable now which may expose the code for some issues (though if you allow people to call arbitrary functions in your code you're probably in trouble anyway, so it may not be a big deal). I think it's better to have an RFC which clearly states what is added/removed and that call_user_func()/$a()/is_callable/callable type/whatever else uses it - are all in sync after it and preferably use the same code, and have tests for all options supported. -- Stas Malyshev smalyshev@gmail.com