Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109191 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15211 invoked from network); 21 Mar 2020 23:34:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Mar 2020 23:34:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E1D491804F3 for ; Sat, 21 Mar 2020 14:58:44 -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,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-ASN: AS15169 209.85.128.0/17 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 ; Sat, 21 Mar 2020 14:58:44 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id r7so10117485wmg.0 for ; Sat, 21 Mar 2020 14:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nX18CtZW4OZeYx5mCUWW6x/VnLHxiyBDWWRZVF6Igz4=; b=f6vWFx0bmpmR2oUDPWLUMa+fstRSQlRwXoCKCPXpgp4loSp20SKW7C3OFbV/crILYw lAwcSJGOIWGY/UFA7l0Of93PETHhjK2dlABthXJFbFflAMxEM1D1+TQE6FvDgfMDDhzT qMkvXNtfa38kSXpNqsFVddwlDhinXwXOdIr0E= 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=nX18CtZW4OZeYx5mCUWW6x/VnLHxiyBDWWRZVF6Igz4=; b=aPhjDRr914DEvSNqLckCFqRlAhVRW6usKKiiPuo97A/l0SVYLkfYH+2nYsZcbT/YkO toQNFReCAyuZ56UrCO2zzc6s15mYLjMv6yTkUAZvARBRk/4nJdwDI4Y01rQUJ7nCHN5G Ln5rGqQBWRsPFgtG8P2lFJ5+tnAcqFMfTmDNXxJXaqVoMm3l3aJuX6FzDwZo3b0MEVV2 G9LWa09cARRRRM0oBcaffhZCngdbj66QBrowfewEk5qfFu2DgY9GHxAzpuYK/jR4ahBA rP6kIzlQo9LLkvI1AsfCaAXogbem9b47J5VDchPXFUAxo2Lkx+LLF8GP4JQ0MTMa5lZI +MTg== X-Gm-Message-State: ANhLgQ3LSY3UD/TXycsp3IQJCx6y2aK4Ne7yeoIduJqT4Qc1JuOiso3v mPCFyCWxoF0una3Jhfpb3W8VSpYk0kgF55Pxmef/k0ce+8wbuaoc X-Google-Smtp-Source: ADFU+vv+iFsFo3st7NF2qpPIJCJYcnOfhIhI13zGHFc4zmoJpL/qS99jwi/jddBUWwcqMRVowfiQRX7hDmkwR4kbc4s= X-Received: by 2002:a7b:c185:: with SMTP id y5mr18077640wmi.179.1584827922288; Sat, 21 Mar 2020 14:58:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 21 Mar 2020 21:58:31 +0000 Message-ID: To: Jakob Givoni Cc: Ben Ramsey , PHP internals Content-Type: multipart/alternative; boundary="00000000000056acbe05a164811e" Subject: Re: [PHP-DEV] [RFC] is_literal() From: craig@craigfrancis.co.uk (Craig Francis) --00000000000056acbe05a164811e Content-Type: text/plain; charset="UTF-8" On Sat, 21 Mar 2020 at 21:23, Jakob Givoni wrote: > On Sat, Mar 21, 2020 at 3:26 PM Craig Francis > wrote: > > > > As to the name, it's to work alongside functions such as > > is_int(), is_string(), etc - is that a good enough reason? > > I think it could cause confusion since int and string are value types, > - literal is not a type as such, it merely describes the way the value > was created. > I'm happy to use a different name; but I should add that is_numeric() isn't really a type, there are other functions such as is_writable(), and the taint extension uses is_tainted(). > I'm under the impression that PHP already defines these as literals > > Does anyone know if that is correct? Does PHP remember how the string > variable / constant was created? > I've talked to Paul Dragoonis and Derick Rethans recently (they both kindly did talks at PHP-SW); when I mentioned it to Paul, I was told that's where I should start looking, and that was the correct terminology; and Derick helped confirm some of these ideas (but we were walking to the pub at the time). And while I keep trying, I don't know enough about C, or the internals of PHP. --00000000000056acbe05a164811e--