Re: Is this a bug?
| From: | Jochem Maas | Date: | Fri, 29 Aug 2008 21:26:02 +0000 |
| Subject: | Re: Is this a bug? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279030@lists.php.net to get a copy of this message | ||
T Lensselink schreef:
Catalin Zamfir Alexandru, DATAGRAM SRL wrote:ouch. don't forget you can do: $> php - l yourscript.php to test for syntax errors (the warning does show up with this). additionally a good syntax highlighting editor can help you to spot stuff like this ... anything to stop the eyes from bleeding :/Hello guys,I've been stalking on the list for some time. Didn't haveanything to report/talk, until now. I have a code like this, maybe you guys can reproduce it, with output buffering started: Echo 'something'; Echo 'another thing'; Echo 'something <br />'\;What happens is that ANYTHING that was echo'ed until that \,will not reach the buffer. Although, this should actually be a Parse Error, it isn't, it just echoes what was echoed after the god damned \. It took me two hours to find this typo in the code .
is this character ever valid as an escape character outside of a string? if it is that's news to me and if it isn't then really it is a bug ... it should be a straight up parse error ... chances are that it's down to limitations in the lexer? the output buffer handler that seems to be swallowing the warning every second request .... now that is weird.The script doesn't cause a parse error Instead it throws a warning. 'PHP Warning: Unexpected character in input: '\' (ASCII=92) state=1 in' Don't think it's a bug. And the reason there's no syntax error is because the \ is a PHP escape character.Can you guys reproduce the error? I can actually give you alink to the server where this code runs.