Re: Improving output of syntax errors

From: Date: Mon, 29 Jun 2020 06:27:33 +0000
Subject: Re: Improving output of syntax errors
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-110764@lists.php.net to get a copy of this message
> As a special-case, quoted strings show the string's *content* in double quotes, e.g. > 'unexpected quoted string "foo" ...' rather than 'unexpected quoted string > ""foo"" ...' or 'unexpected quoted string "'foo'" > ...'. For me, in this case, you have dropped the wrong pair of quotes. That is, I prefer to see the quotes used in the source text (“unexpected string 'foo' ...” or “unexpected string "foo" ...”), over the quotes that make error messages consistent with other error messages. This is because I like to have hints that help me to visually identify the offending string in the source text when it is of length 0 or 1, but on other hand I don’t care about consistency across error messages. —Claude

« previous php.internals (#110764) next »