Re: What else can cause "unexpected T_SL" error other than heredoc?
| From: | D. D. Brierton | Date: | Thu, 25 Nov 2004 12:54:01 +0000 |
| Subject: | Re: What else can cause "unexpected T_SL" error other than heredoc? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202847@lists.php.net to get a copy of this message | ||
On Thu, 25 Nov 2004 06:26:22 -0600, Greg Donald wrote:
> On Thu, 25 Nov 2004 12:17:01 +0000, D. D. Brierton <darren@dzr-web.com> wrote:
>> We've been getting the following error:
>>
>> [error] PHP Parse error: parse error, unexpected T_SL in
>> /foo/bar.php on line 136
>
> Can you post some of this code? Are all your heredoc instances
> completely left justified?
Okay, from "baz.php":
// load environment settings
require_once '../common/re5ult_settings.php'; // "bar.php" in my example
require_once '../common/re5ult_utils.php'; // "heredoc1.php"
require_once '../common/re5ult_xml.php'; // "heredoc2.php"
All of the heredoc instances were fine (as I think demonstrated by
commenting out the reference to re5ult_settings.php but NOT to the files
which contain the heredoc instances). Here is an example of one of them:
echo <<<EOMSG
</td>
</tr>
</table>
</body>
</html>
EOMSG;
>> But, bar.php does NOT contain any heredoc quoted strings, nor does it
>> contain anywhere the strings "<<" or ">>". So what could be
>> the cause of
>> the T_SL error?
>
> I dunno if that's just a typo in your post, but heredoc requires 3 <<<
> or >>>, not two as you wrote.
My point being that the file that certainly appears to be causing the
problem doesn't contain the string "<<" or ">>" and therefore
nor does it
contain "<<<" or ">>>".
> Are you using any sort of PHP cache by chance?
No.
Thanks for helping.
Best, Darren
--
======================================================================
D. D. Brierton darren@dzr-web.com www.dzr-web.com
Trying is the first step towards failure (Homer Simpson)
======================================================================