Re: [RFC] Name issue - is_literal/is_trusted

From: Date: Thu, 24 Jun 2021 10:07:09 +0000
Subject: Re: [RFC] Name issue - is_literal/is_trusted
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-115105@lists.php.net to get a copy of this message
Hi Stephen, I believe the idea was for dynamically generate table names, or numbered tables/columns. E.g. function getTable(string $table){ // is_literal check here } $number = (int) $_GET['tableno']; if($number < 0 || $number > 10) { throw new Exception("Invalid number"); } $tablename = 'table_'.$number; getTable($tablename); The number is concatenated to the table name. --Kamil

« previous php.internals (#115105) next »