String after // is causing script to bomb

From: Joshua Beall (jbeall_at_heraldic.us)
Date: 10/31/03


Date: Fri, 31 Oct 2003 00:09:56 GMT

Hi All,

I have the following comment in one of my lines of code:

// a processing instruction like <?php return "Hello, world!"; ?> somewhere
in the XML would cause the

Now, when I try and execute the script, I get a parse error referencing the
line on which that comment occurs. Taking out the part that reads "<?php
return Hello World;" ?> makes the parse error go away.

Using /* */ style comments also eliminates the error.

Is this a bug? Should not everything after // be ignored by the parser?

FYI, here is the error:

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or
`T_VAR' or `'}'' in <filename> on line 130

  -Josh



Relevant Pages

  • Re: calling a script with arguments
    ... I'd like to be able to build the XML record separately and just ... The script needs to be excuted at the shell ... I'd like to be able to execute: ... How, from within, the script to I get the xml file? ...
    (comp.lang.perl.misc)
  • Re: calling a script with arguments
    ... I'd like to be able to build the XML record separately and just ... The script needs to be excuted at the shell ... I'd like to be able to execute: ... How, from within, the script to I get the xml file? ...
    (comp.lang.perl.misc)
  • Problem with "" characters -- was: Parse error from bad variable?
    ... I had just been writing and re-writing the script so many times late ... > actually causing the problem). ... > I have been running a test version of our program in Japanese. ... For this I get a parse error which reads: ...
    (alt.php)
  • Re: Parse error from bad variable?
    ... >> I have the following portion of our main ecommerce script. ... >> But somehow, when the script is run, I am now getting a parse error, not ... //If this is an Upgrade, ...
    (alt.php)
  • creating an instance of a custom control in xslt?
    ... I've got the results of a query being returned in XML and processed ... My problem is that I've got a Custom Control I'd like to place in ... which throws a parse error because the "ucc" namespace is undefined in ... out how to use that with XslTransform. ...
    (microsoft.public.dotnet.xml)