Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120941 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41083 invoked from network); 29 Aug 2023 07:42:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Aug 2023 07:42:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AA1201804F2 for ; Tue, 29 Aug 2023 00:42:06 -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_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-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 29 Aug 2023 00:42:03 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-4ff8f2630e3so6306046e87.1 for ; Tue, 29 Aug 2023 00:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693294920; x=1693899720; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Fv+jpfaGLx8yOq5nJBNf9SCr+37S6x1Sl45RREAIIag=; b=Or0OX6rP64cwWbaoOtHkz5ErrtVJGUplpu3Gk1/5L0NfhLfgRKLlRyX8tU78POVScP nAV23kzv/NCAtne7PI+Pjb/8qW/U+s7zNvS1vrt8664Xbw1MUJWdHVo0IeSS+E3DHX2y rCEVDzfaGRz5dY6ts/jGFjTF2mVvKuhR2NlaqkZ75eDpwUia5UzA3mRJuUXoHSZ20A3i 9h13Hce/O8y0dsJrD+yj4UybpTW2CFQAPV2k2MfwkEC7c1TU+dyj8Tve0golUJPYmg43 4KEnda65DhDhmGc2MEIvg8va4olFDrlT6Pj+UrDn/UChgcvj9a7FC9a5b9wGqgNLoUcz twaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693294920; x=1693899720; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Fv+jpfaGLx8yOq5nJBNf9SCr+37S6x1Sl45RREAIIag=; b=RJP9grRuOVYlMurY8Alp1iqKQsOKCP4yKBvUfZXFp7aQtTfLRPqlszMSUDDL98KoEZ FI0V4ktg4NA9CLsYlvpq+fgOE8FuBRKePcMv4R7tFnlhMpEw7u1w2ssEFnBdxTI3r3F/ JbMZB/I5SK+4Dg4/EQbtD6sfj2Wj8V305b6EQR3plRguaP2SOz3RYGkW1RfomX5mOWre oUebMCuVe+XdKzz26Idv+0ftVDMd68BQxyJ6aiZ7treJuaSM3yKTPv0kABAz9Jn7ej+2 wq04i440CpyL8jGORGhnNLFfdTUnvFwVayXsApVPbSS8hcN8GtwnCn679KCM9MRrTKoy OEMw== X-Gm-Message-State: AOJu0YyvNT69cdzHAJ1CDAQhLRCX71CtWr4ejr37GCErjpeeamT6ZLYH 0/QTYA6UHJS9UqnlXSdEZWraaHQhrkIbJoAgqRrzo2Uz X-Google-Smtp-Source: AGHT+IGO7jcxLFAozMkzpqTfpYusYh/9G4nDmE4k4grgLSspacPL8/RUR/gDC36vuNFQFULa7eaw4nheCnj5JbctTQ4= X-Received: by 2002:a05:6512:220f:b0:4fb:81f2:422b with SMTP id h15-20020a056512220f00b004fb81f2422bmr23873411lfu.54.1693294919677; Tue, 29 Aug 2023 00:41:59 -0700 (PDT) MIME-Version: 1.0 References: <4406C50C-18FF-4F20-BA7B-206E86610CCC@sakiot.com> In-Reply-To: <4406C50C-18FF-4F20-BA7B-206E86610CCC@sakiot.com> Date: Tue, 29 Aug 2023 09:41:34 +0200 Message-ID: To: Saki Takamachi Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000002ffd5d06040af264" Subject: Re: [PHP-DEV] Apply strict_types to internal functions From: kjarli@gmail.com (Lynn) --0000000000002ffd5d06040af264 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 29, 2023 at 2:46=E2=80=AFAM Saki Takamachi wr= ote: > Hello. > > I=E2=80=99m Saki Takamachi. > > Inspired by the issue below, I'm thinking of proposing this RFC. > https://github.com/php/php-src/issues/12055 > > As the documentation below states, PHP's internal functions currently > ignore strict_types. > > https://www.php.net/manual/en/language.types.declarations.php#language.ty= pes.declarations.strict > > I think the current spec is not intuitive, > so I propose changing the behavior of the macro > ZEND_ARG_USES_STRICT_TYPES() to allow internal functions to accept > strict_types. > > I plan to make changes in zend_compile.h and zend_compile.c and do the > changes myself, I haven't written any tests yet, but I'm thinking about > making changes like this. > https://github.com/SakiTakamachi/php-src/pull/1 > > As per How To Create an RFC, I will first try to gauge response to this > proposal on the mailing list. > > Thank you > > Saki Takamachi > Heya! I was not aware that strict types didn't work here. While I'm 100% behind the idea, I am afraid that changing this will break code in currently strict files where the assumption was made that it already worked like that. It would probably have to give deprecation notices first, and then possibly a warning or removal in the next major to be feasible. --0000000000002ffd5d06040af264--