Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117836 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56333 invoked from network); 30 May 2022 13:13:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 May 2022 13:13:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 69773180211 for ; Mon, 30 May 2022 07:56:56 -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, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 30 May 2022 07:56:55 -0700 (PDT) Received: by mail-yb1-f180.google.com with SMTP id v22so858590ybd.5 for ; Mon, 30 May 2022 07:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hqNH/AtyiCTlLnaV0CfGmzvf9vg6FACl0psMaSAj7pg=; b=iWftmDu3+LrbZBdYuBt6HVZxTxEbvT+TWahQgYCM91XFP+fgTkPbn+vPQ14OazoNiq hbisVwEnpY0M972TmxoFRy9cYiMN5MMgRAQmRi3mckf65mycVg8Mm2xhvLOYMoEnV7N0 PrZWKERWlArBqwg/dlTBM1xU0ufgPN5Hbb8fjYl1i8EIqcGZQZfbsmh+hofE7V0RpNPU IVCR/88hYNg3tj4mpob5ZTZp0IwpvEY4QOStmAS4SKA6pqLk4o8CJArU1zX8tplHUjII 0n46Sxts2k4tStknOcjnoRasOhG8ae2QHFrWgC/MXtfyvAW81Fks6y58EjGXS0kXTz7Z iEew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hqNH/AtyiCTlLnaV0CfGmzvf9vg6FACl0psMaSAj7pg=; b=bHVE5g6n6by8G8eg+CLtOt/RCticl5pyN5kYl9Hr9eUTJDtjmkgOhwT+53fXEyrkuO W/jF3tVA+g8icqOyD3ZxVbUNtOycsiTPEp0kXcLOycouTYaJQtAH0Ds4ufuk+zaZNWUQ zQVlXavfeQqUVexyShgoFkY7kN8ff0TSVVcdYZr9+qL8NPLQxTfoBAqRHZ2fSvl2v0FW FoA2yciIFZQBlOe280Yl0T6qja3uGUhkuAk+0aNTmOEC612MRA34LRHq/DWjKZYxZiZu rkF6gkgSV1QllYgjde67pxm+jGK7hxMKvEgz5Qvf2Cmcm5peWHh1nlmUsJ4F0AOFyRMj H0bQ== X-Gm-Message-State: AOAM531/g+3lp5aLH2mzP4j7Jc6Hg9jUUwhVnR52MVDSIdmXooXmxpNF 65Jory9a11FUDVyD5e79t+wz80dXIU6rKjlHa8J355Uctg== X-Google-Smtp-Source: ABdhPJzZ1m+CnYMTs/yCtSbTAYmL+S6lVpdRuWwPUQWdYtjz/PyvwLehP33rB9ZJSL/pAzSZeemCIa1NMzJ3zlHRsVc= X-Received: by 2002:a25:8911:0:b0:61e:1c66:17b0 with SMTP id e17-20020a258911000000b0061e1c6617b0mr55858921ybl.354.1653922615460; Mon, 30 May 2022 07:56:55 -0700 (PDT) MIME-Version: 1.0 References: <627D3BCF.7020903@adviesenzo.nl> <628F685B.8090909@adviesenzo.nl> <6291DBBC.8020403@adviesenzo.nl> In-Reply-To: Date: Mon, 30 May 2022 16:56:44 +0200 Message-ID: To: Dan Ackroyd Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [Discussion] Expand deprecation notice scope for partially supported callables From: guilliam.xavier@gmail.com (Guilliam Xavier) Hi Dan, just an error in this part: > Or if support for less than PHP 8.1 can be dropped, using the first > class callable syntax > https://wiki.php.net/rfc/first_class_callable_syntax : > > if (is_callable(static::methodName(...))) { > static::methodName(); > } > > or > > $fn = static::methodName(...); > if (is_callable($fn)) { > $fn(); > } This throws an Error on `static::methodName(...)` [if not callable], before even passing it to `is_callable()`: https://3v4l.org/m29BK And yes, code should probably better use a same variable for both the check and the call, but that could also degrade DX (IDE autocompletion, static analysis) especially if calling with arguments... (the other parts of your message have been answered by Juliette) Regards, -- Guilliam Xavier