RE: [PHP-DEV] [RFC] Deprecate Backtick Operator (V2)

From: Date: Mon, 07 Oct 2019 13:45:31 +0000
Subject: RE: [PHP-DEV] [RFC] Deprecate Backtick Operator (V2)
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-107400@lists.php.net to get a copy of this message
> -----Original Message----- > From: Mark Randall [mailto:marandall@php.net] > > On 06/10/2019 14:18, Reinis Rozitis wrote: > > Since `` are used for literal strings (for poorly chosen reserved words as field, > table names (which happens from time to time)) in MySQL (multiline) queries I > doubt there is a simple way to distinguish and replace everything to exec(). > > Hi, > > As the RFC states, there are already widely used tools available which can do > this reliably: > > https://github.com/FriendsOfPHP/PHP-CS-Fixer > backtick_to_shell_exec > > -- > Mark Randall Sure, it was only a comment about "without huge Regex searches" from previous poster while the tool has those "tricky" parts https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.15/src/Fixer/Alias/BacktickToShellExecFixer.php (hence the help message and comments inside code) rr

« previous php.internals (#107400) next »