|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-12-13 10:30 UTC] stefan dot peer at tiwag dot co dot at
Hi, I had a problem commenting out code fragments.
The problem within the following lines is the single-line comment //
# as comment seems to have the same problem whereas /* ... */ works fine.
if( preg_match( "/(.*?)ELEMENT_(\d+)\{(.*?)\}((<.*?>)+)/", $template_lines[$j], $matched) ){
//preg_match("/(.*?)ELEMENT_LAST\{(.*?)\}((<.*?>)+)/", $template_lines[$j], $matched)
$debug_msg .= "Matched /(.*?)ELEMENT_(\d+)\{(.*?)\}((<.*?>)+)/ within X";
$iterations = $matched[2];
break;
}
These lines bring up the errormessage "Parse error: parse error in includes/functions.inc on line 408", where 408 is the last line of the file.
I am not sure, whether this has to do with commenting out regular expressions.
By the way, I'm using Apache 1.3.14, SuSE 6.4 Linux and I've compiled php with the following switches:
./configure --with-apache=/root/apache/apache_1.3.14
--with-mysql=/usr/local/mysql
--with-config-file-path=/usr/lib
--with-pdflib=/usr/lib/libpdf.so
--with-gdbm=/usr/lib/libgdbm.so
--enable-ftp
--enable-filepro
--with-java=/usr/lib/java
--with-ldap
--with-openssl=/usr/local/openssl
--enable-sysvsem
--enable-sysvshm
--enable-track-vars
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
Note from Chris Newbill <cnewbill@onewest.net> ------------------------------------------ I don't have the ability to update bugs, but I can duplicate this problem. If you escape ?> in your commented line it should work fine. ie \?\> You can reproduce this with the following simple script. (it only happens in logical blocks.) <?php if (true) { // ?> } ?> By contrast this script (outside of a logical block) <?php //?> ?> Would actually print "?>" to the screen Chris