PHP 4.0 Bug #8233: # and // don't work as comment, whereas /*..*/ do
| From: | stefan dot peer at tiwag dot co dot at | Date: | Wed, 13 Dec 2000 15:30:08 +0000 |
| Subject: | PHP 4.0 Bug #8233: # and // don't work as comment, whereas /*..*/ do | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-41194@lists.php.net to get a copy of this message | ||
From: stefan.peer@tiwag.co.at
Operating system: Linux Kernel 2.2.14, Apache 1.3.14
PHP version: 4.0.3pl1
PHP Bug Type: Scripting Engine problem
Bug description: # and // don't work as comment, whereas /*..*/ do
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
--
Edit Bug report at: http://bugs.php.net/?id=8233&edit=1