Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-22 Thread Jason Wong
On Wednesday 22 December 2004 08:18, John Holmes wrote: It is, I guess. ?php $a = ' ? '; $b = ' ? '; ? will work just fine. If you try to comment out either line, though, the PHP processing will end at the ? and spit out the rest as plain text. So, text can have as many ? as you want

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-22 Thread Curt Zirzow
* Thus wrote Jason Wong: On Wednesday 22 December 2004 08:18, John Holmes wrote: It is, I guess. ?php $a = ' ? '; $b = ' ? '; ? will work just fine. If you try to comment out either line, though, the PHP processing will end at the ? and spit out the rest as plain text. So,

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-22 Thread Richard Lynch
Jason Wong wrote: On Wednesday 22 December 2004 03:53, Richard Lynch wrote: ? can be caught by PHP as the end of PHP mode, no matter where you put it in a string or not. You can't be serious? Or have I misunderstood you? ?php echo '?php ?'; ? Works as expected, ie displays ?php ?.

[PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Steve Brown
I'm working on a script that will parse through a long string using regexs to pattern match a certain format. I'm having an issue with a '?' in a string being picked up as an end-of-code character, but only if the line before it is commented out. If the line before is NOT commented out, PHP

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread John Holmes
From: Steve Brown [EMAIL PROTECTED] Unexpected results: If line 16 (indicated below) is commented out, the '?' in the string on line 17 makes PHP stop parsing and the rest of the script is simply dumped to stdout. If line 16 is NOT commented out, the '?' is NOT picked up as being a PHP tag

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Jason Wong
On Wednesday 22 December 2004 01:12, Steve Brown wrote: I'm working on a script that will parse through a long string using regexs to pattern match a certain format. I'm having an issue with a '?' in a string being picked up as an end-of-code character, but only if the line before it is

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Steve Brown
Quote: The one-line comment styles actually only comment to the end of the line or the current block of PHP code, whichever comes first. This means that HTML code after // ? WILL be printed: ? skips out of the PHP mode and returns to HTML mode, and // cannot influence that. If asp_tags

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Richard Lynch
Steve Brown wrote: I'm working on a script that will parse through a long string using regexs to pattern match a certain format. I'm having an issue with a '?' in a string being picked up as an end-of-code character, but only No need to run it. ? can be caught by PHP as the end of PHP mode,

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Jason Wong
On Wednesday 22 December 2004 03:53, Richard Lynch wrote: ? can be caught by PHP as the end of PHP mode, no matter where you put it in a string or not. You can't be serious? Or have I misunderstood you? ?php echo '?php ?'; ? Works as expected, ie displays ?php ?. -- Jason Wong - Gremlins

Re: Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread John Holmes
You will notice that the previous line also contains a '?' sequence, so I'm confused as to why this would die on one line but not the other? Or is this some freak combination of comments and PHP tags? :-o It is, I guess. ?php $a = ' ? '; $b = ' ? '; ? will work just fine. If you try