Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114846 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55835 invoked from network); 13 Jun 2021 19:30:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Jun 2021 19:30:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 200971804C9 for ; Sun, 13 Jun 2021 12:47:02 -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 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 ; Sun, 13 Jun 2021 12:47:01 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id 3-20020a05600c0243b029019f2f9b2b8aso11536672wmj.2 for ; Sun, 13 Jun 2021 12:47:01 -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=60//qhsP6l6Jh/lpwEAkwsEo8qcNDxQCTyfwlVbqGgQ=; b=WqqARtCFDFhpqOpQ621q9FmN6xaolW4qDccvWxjxk6tdoCfQ4JqzmfkWQdpR7nione wTchq7GfAm6c/emLk7RFGsM1nKt0X8rHoGW20PCjkdOv6q6ogwdVCAD6JnOZAqJoEj1Q vyEX2jcQOuFtKYmCt+KhmD82/Vumwx61gXcwLutEr2v1AXwDmaRLzoqkPDtqby+9bWxZ x72PvIEbEP48SXNVdIx+QIpeJtX+fH2ID5Z26OcaWJOIMdJMhmLusL7t6ZajKFTBsqYi Xls0ypAynJoEU9QCMFGfQgZqlQbtwzlWEY265d7ZmblOdf03oIiloJWqMvN1B1bodkeC qZ6g== 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=60//qhsP6l6Jh/lpwEAkwsEo8qcNDxQCTyfwlVbqGgQ=; b=QD6xAsTkq6urW6b7txSgPcwZC35ms3losQtnHcj/UxWlqIB9vpQK6GsLXsdTNaqJXg s3lPn2KtY/CMTGDStC1gJ+s6spNC2SpTW+y7HHVQWJurj84Yhlzt9kgF7dtfYetuO+1p wgyrDsfFEpoyYKBmvxe6BwaQiMqNBnPCzptUP0NUSzEpFUNtc2Fb6NXT7ri4eNa8Nyn9 +fDa5G9SorvGTZCu5xmpi1mGD/z2QSifSUsdMI3PLnAN7QMR6fdklHs9l+anTevpOvk0 RPD1b4L/0IA9mCcrBFmn43j9opDiVnPoZ24HpCZ4P1lbY3Teq/9kju6xeaw+U/NakbaN X+bg== X-Gm-Message-State: AOAM532x+aCM8jM0PSX6ojnLjss9PH9C1dIg1qfGMX3taDy5uIXhi/SC G/iHedJN+VDsCJI30tQUv40D17arHChwwR2HVUEZAjjraLL/yA== X-Google-Smtp-Source: ABdhPJxQNee5ssLAHqRvQFXQPEoFIACSFT0MCpYKu17NGdmm3u4v0ems9ExkWaeoFm/EqTIxouXbm3FNVIulumRhPLM= X-Received: by 2002:a05:600c:3b10:: with SMTP id m16mr28922329wms.55.1623613619159; Sun, 13 Jun 2021 12:46:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 13 Jun 2021 22:46:47 +0300 Message-ID: To: Craig Francis Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] is_literal From: someniatko@gmail.com (someniatko) Hi! From what I understood reading the RFC, this looks like a new type, "literal string", specifically a subtype of "string". Have you considered instead of forcing library authors to use `is_literal()` check everywhere on their input boundary and making sure no place where input is passed, is forgotten, to let them type their whole codebase, including internal, against the new `literal-string` type, which would be enforced by PHP all the time? From my perspective as a PHP developer, it would serve clearer intent than only checking in a few places which presumably may take user input, i.e. you could explicitly state "this function does only work with literal strings". Regards, someniatko