Re: Bug #2321: problem with <? ... ?> in a string if line commented out
| From: | Zeev Suraski | Date: | Sat, 18 Sep 1999 15:41:18 +0000 |
| Subject: | Re: Bug #2321: problem with <? ... ?> in a string if line commented out | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-11050@lists.php.net to get a copy of this message | ||
This behavior is intentional.
Zeev
On 18 Sep 1999 dnaber@mini.gt.owl.de wrote:
> From: dnaber@mini.gt.owl.de
> Operating system: Linux 2.2.12
> PHP version: 3.0.11
> PHP Bug Type: Parser error
> Bug description: problem with <? ... ?> in a string if line commented out
>
> This works fine:
>
> <?
> $var = '<? ?>';
> print $var;
> ?>
> test
>
> As expected, it puts out "test". But this fails:
>
> <?
> #$var = '<? ?>';
> #print $var;
> ?>
> test
>
> It puts out "'; #print $var; ?> test". The same happens
> if you comment out with //. One can work around the problem with
>
> #$var = '<'.'? ?'.'>';
>
> I'll attach two possibly relevant parts of my php3.ini (it's a Suse 6.2 installation
> and I think I didn't change anything).
>
> Regards
> Daniel Naber
>
> ;;;;;;;;;;;;;;;;;;;;
> ; Language Options ;
> ;;;;;;;;;;;;;;;;;;;;
>
> engine = On ; enable PHP 3.0 parser
> short_open_tag = On ; allow the <? tag. otherwise, only <?php and <script> tags
> are recognized.
> asp_tags = Off ; allow ASP-style <% %> tags
> precision = 14 ; number of significant digits displayed in floating point numbers
> y2k_compliance = Off ; whether to be year 2000 compliant (will cause problems with non y2k
> compliant browsers)
> ; Safe Mode
> safe_mode = Off
> safe_mode_exec_dir =
> ; Colors for Syntax Highlighting mode. Anything that's acceptable in <font
> color=???> would work.
> highlight.string = #DD0000
> highlight.comment = #FF8000
> highlight.keyword = #007700
> highlight.bg = #FFFFFF
> highlight.default = #0000BB
> highlight.html = #000000
>
>
> ;;;;;;;;;;;;;;;;;
> ; Data Handling ;
> ;;;;;;;;;;;;;;;;;
> magic_quotes_gpc = On ; magic quotes for incoming GET/POST/Cookie data
> magic_quotes_runtime= Off ; magic quotes for runtime-generated data, e.g. data from SQL, from
> exec(), etc.
> magic_quotes_sybase = Off ; Use Sybase-style magic quotes (escape ' with ''
> instead of \')
> track_vars = On ; enable $HTTP_GET_VARS[], $HTTP_POST_VARS[] and $HTTP_COOKIE_VARS[] arrays
> ; automatically add files before or after any PHP 3.0 document
> auto_prepend_file =
> auto_append_file =
>
>
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
--
-----------------------------------------------------
Zeev Suraski <zeev@zend.com> http://www.zend.com/
For a PGP public key, finger bourbon@netvision.net.il