It is because you accidentally escaped the single quote, so the parser interpreted the quote as literal character, causing the error in your code.
..., '\', ...
↑
The backslash is an escape character. It causes the next character to be interpreted as literal character. So the quote right behind the backslash does not end the string, it is interpreted as a literal single quote. That causes the syntax error.
In order to fix the error, you must escape the backslash itself, so it is not an escape character anymore, but a literal backslash:
..., '\\', ...
The first backslash causes the second backslash to be interpreted literally.
$list = array('$', '\\', '"', '_REQUEST', '_GET', '_POST', '_COOKIE', '_FILES', '_SERVER', '_ENV', 'GLOBALS', '_SESSION', 'toupper');