Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115271 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69695 invoked from network); 2 Jul 2021 04:11:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Jul 2021 04:11:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D46E41804F3 for ; Thu, 1 Jul 2021 21:31:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 1 Jul 2021 21:31:54 -0700 (PDT) Received: by mail-pl1-f180.google.com with SMTP id z4so4943306plg.8 for ; Thu, 01 Jul 2021 21:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u9l5hsDh87a94Pf7q2nwo0pzxgFs4RsYeKGe8eQub6s=; b=JsxYCDA1oyyhtcXI4hsq3BODKG4fnUVBE3qF8gNg/kbtp/j2zMlAEKIqFUZB2T/e61 lpwXCC71wPUE8g+J3ckIlEs0NEtpsPNKCQvQq3hu7+RtV2B8eN92HIkStY0SMaGDmyv9 Lk+kAcESmPMs9W5AORA0aeYiJ6GtBCeRU7tnV56JEDmTQcUqDCz0zkLNe6e5trPO+b3I tQ5j9cwQR44+Pc0dogpA0/dxTIWDCEqwzQvOK/Zg3yOZBwB/wudJ82mZ51laJ8jCIzKc ehExWP7HwrjL+hh02yunv9MacTuT8mxiIDy4v2QjS8OYoU2qoW84eNsSEzqc0HzdoOkb V7tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u9l5hsDh87a94Pf7q2nwo0pzxgFs4RsYeKGe8eQub6s=; b=XA6bqajBdcRzGaFga1v5NFIauJIi5xB00GrEEYpdVQyDb/m6uJwWqSRtHVklvfMfpR Mpngkfk4Q93RDs8clzy2KqgfhT8UUds2b/acuhY1L7KwXqX7l1k7umTrT0dsVWU2ZvWI ph96tf6rYtDRgQITkUb79djNmWfRxGO6UP7ug5iGpuj/zOYtCEKfycBYaZgb1/JFd1gj Pp12eJuNtUgbeNz2EVLF3p3vxvhpC+xkV/gL87JmzMu8HnpPM1ekJ9Wezm3B2HzgaEmO QcszOQKD+EnWzZFrtLyJpfcI2gifjtusR9CCf/5XXeJ3/T/eDwNCVjLqNOkkY1FIdoky pyZA== X-Gm-Message-State: AOAM530sxPPSHoZDc/kRYbV1/E+JRHKUcnkLUQXRtoNLBCmVhnkN2ocC 8DPHoiorV+aCfpNl5UDytOtw82RefgNfRSL4yBpJReYXUlclRyFU X-Google-Smtp-Source: ABdhPJzT9RX16/sogbyB0VGfxx5BJ8a1MS0/ZX3991tox6KF5UTyj1yqSjoLT2G2a8HanECviDdBIthtVESe4kxO6P4= X-Received: by 2002:a17:902:bd04:b029:11f:d602:56f3 with SMTP id p4-20020a170902bd04b029011fd60256f3mr2922254pls.33.1625200313103; Thu, 01 Jul 2021 21:31:53 -0700 (PDT) MIME-Version: 1.0 References: <1ae611cb-b077-3db0-3237-c7ffa1c6e745@ralphschindler.com> In-Reply-To: <1ae611cb-b077-3db0-3237-c7ffa1c6e745@ralphschindler.com> Date: Fri, 2 Jul 2021 09:00:35 +0430 Message-ID: To: Ralph Schindler Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000059f91705c61c6f13" Subject: Re: [PHP-DEV] [Proposal] call_user_func_map(): flexible named parameter mapping for call_user_func* From: hossein.baghayi@gmail.com (Hossein Baghayi) --00000000000059f91705c61c6f13 Content-Type: text/plain; charset="UTF-8" Hello, On Sun, 27 Jun 2021 at 19:09, Ralph Schindler wrote: > > This proposes a method for a publisher/framework/producer (the caller of > the callback) to document all the parameters that are available as named > parameters, and subscribers/consumers (creator of the callback) could > subscribe to what they need by name. > Wouldn't it rather be nice if we had more detailed callable types instead? I mean instead of simply defining a parameter type as `callable` we could specifically define what the callable expects. Something like this: ``` function bar ((int, string):bool $callback) {...} ``` A more generic approach that could be more descriptive, maybe. I have no clue if this was already discussed in other threads or not. And whether it is feasible to implement. Regards, --00000000000059f91705c61c6f13--