Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77940 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56579 invoked from network); 13 Oct 2014 20:34:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2014 20:34:50 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.47 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.192.47 mail-qg0-f47.google.com Received: from [209.85.192.47] ([209.85.192.47:45301] helo=mail-qg0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/E3-32407-9673C345 for ; Mon, 13 Oct 2014 16:34:49 -0400 Received: by mail-qg0-f47.google.com with SMTP id i50so7348033qgf.6 for ; Mon, 13 Oct 2014 13:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=g0/Bfz1DwMLbLh+GKK5+1UM15P90LaxWNvtvleNnc/s=; b=Jn8sgdsV7dK9UWRuLgoGdOjRR8ZLSntIpDPhiLhGW4QveIrXBZom6lFDdyswnZjojj +TELm8a/BUJCxLwfrIYcFtMLBBgahSNfGV28Ab/KaQtT0jTPIxKILDXjPIl0UvijsOzG 6DhSWxToR++YHWktFpduZbkEIbwbfkw6UEUElvYwMBdyz9RcBvctQ+dAjZsuwSQitPk+ elhLMUe96bPR9OeYKNLWP05jSaQAeof4EfdwQ52R5RDMi1BWnBwN+kBt7M4HT1kJTOXI kg26FO53T27CauaCHLl5A0G/VLUj/e8Xi7d3gdSDDfB6quyYNbGT491jWu+dyorL4FX5 MqMg== X-Received: by 10.224.14.67 with SMTP id f3mr1546373qaa.104.1413232485857; Mon, 13 Oct 2014 13:34:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.97.139 with HTTP; Mon, 13 Oct 2014 13:34:25 -0700 (PDT) In-Reply-To: <543C2A08.9020004@sugarcrm.com> References: <543C1E5A.7040405@sugarcrm.com> <543C2A08.9020004@sugarcrm.com> Date: Mon, 13 Oct 2014 22:34:25 +0200 Message-ID: To: Stas Malyshev Cc: PHP Internals List Content-Type: multipart/alternative; boundary=047d7beb95b24e0085050553d475 Subject: Re: [PHP-DEV] Deprecation of func_get_args(), call_user_func_array() and related API From: ocramius@gmail.com (Marco Pivetta) --047d7beb95b24e0085050553d475 Content-Type: text/plain; charset=UTF-8 On 13 October 2014 21:37, Stas Malyshev wrote: > Hi! > > > My point is that providing them as "userland implementation" even inside > > core would be more interesting than having something magic going on > > under the hood. > > It certainly may be "interesting", and nobody prevents you from writing > a blog or implementing a library doing this. However, it is not the > reason to change the core functions of PHP. > It's not about "changing" them: from a consumer PoV, they'd still be available. > > Yes, I realize that complete removal would completely kill PHP's > > adoption for the next version, so I'm thinking about something like an > > ini setting: > > > > "zeh_legacy_includeh = '/zeh/path/to/old/functions.php';" > > You're trying to solve a problem that did not exist before you tried to > solve it. > The problem always existed, and it's that it is very hard to escape from an API that is dictated by the language itself. Getting gradually rid of those APIs and making them swappable pieces simply increases the degree of freedom that we get in our applications, by having less people rely on stuff like `array_map` and `array_filter` (and the funny parameter order), because PHP no longer has them under its protective wing. My suggestion for `call_user_func` and related deprecation is just spawned by some debugging raging, but the opportunity to kill a large chunk of the shipped library stands. > Yet this would allow removing a lot of internal functions that were > > written just for the sake of it, and move them to something that can be > > maintained by a larger userbase. > > These functions weren't written "just for the sake of it". They were > written because people needed it. > Right, and now they can be built in a way that isn't coupled with the engine itself. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --047d7beb95b24e0085050553d475--