Re: debugging
| From: | Zak Greant | Date: | Thu, 22 Jun 2000 17:51:53 +0000 |
| Subject: | Re: debugging | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2677@lists.php.net to get a copy of this message | ||
Rasmus,
You must think me quite foolish! ( or perhaps, having read other posts of mine, you know that I am quite foolish) <wink>
If my reply did help clarify the situation, I am quite sorry.
I was not attempting to state what behavior I would like to see from the parser - I was trying to illustrate what the parser would do when it encountered a missing delimiter.
Zak
At 10:43 AM 6/22/00 -0700, Rasmus Lerdorf wrote:
Any missing delimiter will cause an error. I usually find that with quotes and parenthesis there is another matching delimiter a line or two below the missing delimiter. In cases like this, the parser catches the missing delimiter as soon as it encounters the messed up syntax. For Example: <? $question = "Hey, how are you doing?; $answer = "Fine, how are you";Zak Greant Creative Director Nucleus Information Service Inc. "A camel is a horse designed by a committee." - Alex Issigonis (Designer of the Austin Mini)^// Error caught here ?> The parser should complain that there is a syntax error on line 3. As soon as it encountered the first quote on that line, it knows that there is a problem because there is no semicolon to end the line. And it does. <?php $question = "Hey, how are you doing?; $answer = "Fine, how are you"; // Test ?> The above script will give you a parse error on line 3. -Rasmus