Re: debugging
| From: | Rasmus Lerdorf | Date: | Thu, 22 Jun 2000 17:43:15 +0000 |
| Subject: | Re: debugging | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2673@lists.php.net to get a copy of this message | ||
> 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";
> ^
> // 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