Re: [RFC] Name issue - is_literal/is_trusted

From: Date: Sat, 26 Jun 2021 12:47:05 +0000
Subject: Re: [RFC] Name issue - is_literal/is_trusted
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-115156@lists.php.net to get a copy of this message
On 26 June 2021 13:24:55 BST, Dan Ackroyd <Danack@basereality.com> wrote: >It allows silly mistakes to slip through and make it to production. As > per https://news-web.php.net/php.internals/114858: Perhaps you missed my reply earlier where I pointed out that the traceability problem you've identified is valid, but not solved by removing the flag on concatenation: https://news-web.php.net/php.internals/114868 Regardless of whether you get an error message from assert(is_literal($foo) && is_literal($bar)) or literal_concat($foo, $bar) the actual big will almost certainly have happened somewhere else in the program, and you'll need to trace the data flow of $foo and $bar to find out where. To avoid that, you'd have to avoid propagating the flag on *any* operation, including assignment and return statements, which would clearly be pretty pointless. >Also, I'm going to cross-post this, as it's unreasonable to expect >people to read all of the different threads. Please don't. All it will achieve is more list traffic, more fragmentation, and more messages that people who aren't interested have to ignore. Regards, -- Rowan Tommins [IMSoP]

« previous php.internals (#115156) next »