You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
String color formatting error in PHP strings starting with "SELECT" #80810
<?php
$a = 5;
$test = "SELECT * FROM data WHERE data_key = 'id-".intval($a)."'";
Expected: intval($a) would not be formatted as being part of the string.
Actual result: intval($a) is color coded as if it were a part of the string.
Additional notes
If you remove the "SELECT" from that string or make it lower case, the color coding works correctly.
This behavior also occurs if you begin the string with INSERT in upper case.
The color coding is also correct if you remove the first single-quote, or if you escape it with a slash. Escaping it with a slash would result in a the string actually containing a backslash and then a single quote though.
Activity
vscodebot commentedon Sep 12, 2019
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
roblourens commentedon Sep 15, 2019
Dupe of #44290