i think there may be a definite bug in the parsing/highlighting engine, when it comes to escaping backslashes:
any code after the function (which is supposed to double backslashes in a string and to escape single quotes):
- Code: Select all
function for_sql($val)
{
return str_replace("'", "\'", str_replace('\', "\\\\", $val));
}
is treated as a string literal (green). this also means that any functions following this code will not be displayed in the code explorer - this is extremely inconvenient!
When I change the code to the equivalent:
- Code: Select all
function for_sql($val)
{
return str_replace("'", "\'", str_replace(chr(0x5C), chr(0x5C) .chr(0x5C), $val));
}
everything is displayed correctly, with the functions being listed in the code explorer.
But, of course, writing things this way is REALLY cumbersome: can this be fixed?
Thanx & Regards,
Torsten