Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114945 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73501 invoked from network); 18 Jun 2021 10:28:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Jun 2021 10:28:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C1D8A1804D9 for ; Fri, 18 Jun 2021 03:45:24 -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 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 ; Fri, 18 Jun 2021 03:45:24 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id b37so13355706ljr.13 for ; Fri, 18 Jun 2021 03:45:24 -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=5UZi0O8ebdnE7I30qldBnEoRdffxBYJ7SFN7zaD1c0I=; b=a5h2knMrwf+nZoriLV9+nJhKwUUk2uvUsFMS/HbprC1sv9xHAqx2misOrvGJjQpAj/ 9lb30d91M/jDM0TK3IMFDl9mUVsRYt2TvkuMAL6QuzQErfHWwXFprXtVIFi4t7Vp3cVG NyXUVcZlATZTfNpovGIzHcF0nbpzQNDtrSaxodreBuEBT1Ew/6pSJUAhbIq+pNJ7jqN3 oy7h2CRsrNZqsR2ZtXxZOGnpx1+TYW0td9BstiYo1pkMcUMBR0hWDU4D5LN5ylyUveBh glQAjpbRdp9Gy/TFgb2woQ6nwVdiC6DbzJILSScAQsmItnFlFBSwKK00Cte9cYNj2Xgg 8v3g== 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=5UZi0O8ebdnE7I30qldBnEoRdffxBYJ7SFN7zaD1c0I=; b=ac/9I5wLTu3hJHzWO4svCHIALFJFzHTbkWWS19nLOE5Gfp06u7k9Ya6MDTt09Zt3oO QvZXwGXeUZNeqJ8BROX206UnXx5SYvsGXtarWWeqHinDP78KipGUDEYyzOhMoBWPI+/d RtyEWeVUA8EVlBRlIAw7bY0G4HhLVMS2vqlxIkermj0Kz98C3t8UpuBq9F/HgwGKqXDZ /oxq8x6QGv4bhnpUXYk5BtH7Jx4LBtLxqEApYDmRYIzwBZd1ypG/N54v8XmhR+iLy4zm b2mLrhPI315N5DQTFArlmxLWVQcdDO07AkleCuUNLw1EvdctmDUpAXV/HgLLfhBgl9Qw Y/Bw== X-Gm-Message-State: AOAM531yi/Bm1cxefh4OTznDpfy+MCOHT+39IFVqLIhSHCV8tivWysTM 0kalFV6LWuYRYD1+4PhqBsxCUWF+g6oWGeAQ9zzFxmQqRv76 X-Google-Smtp-Source: ABdhPJydHJTY8BKIZYPueQdTFCPRFMejpadAQq/d0ajIz9jP23jJDxhD58qttGxh9+tmF/MgWT255NRFvlg3pIONr1w= X-Received: by 2002:a05:651c:b2a:: with SMTP id b42mr8895039ljr.128.1624013122508; Fri, 18 Jun 2021 03:45:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 18 Jun 2021 12:45:10 +0200 Message-ID: To: Pierre Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000047191605c508053b" Subject: Re: [PHP-DEV] Re: [RFC] is_literal From: guilliam.xavier@gmail.com (Guilliam Xavier) --00000000000047191605c508053b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 18, 2021 at 12:10 PM Pierre wrote: > Le 18/06/2021 =C3=A0 08:00, Craig Francis a =C3=A9crit : > > As there=E2=80=99s been no issues raised with supporting integers, and = doing so > > will help adoption, the implementation will be updated to allow them. > > > > Now to choose the name, with the options is_known() from Joe and > > is_trusted() from Moritz: > > > > https://strawpoll.com/bd2qed2xs > > > > Keep in mind it might also become a dedicated type in the future. > > > > Craig > > If I'm understanding this correctly, what you call a literal value is a > statically written and compiled string, which doesn't originate from a > user given value, but was hardcoded at some point. If so, even if the > primary use is of course for security concerns, the realty of what it > does is not, it's mostly about how a certain variable was defined / > assigned. How about is_static() or is_value_static() ? Or even > is_statically_defined() ? There's many options in this path. > IIUC, with the addition of integers, the function will return true for e.g. `'SELECT * FROM foo LIMIT ' . (int)$limit` even if $limit doesn't come from a "static" value (e.g. random_int() or even `$_GET['limit']`) --=20 Guilliam Xavier --00000000000047191605c508053b--