Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49012 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64702 invoked from network); 8 Jul 2010 03:18:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2010 03:18:38 -0000 Authentication-Results: pb1.pair.com header.from=scott@macvicar.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@macvicar.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain macvicar.net from 97.107.131.220 cause and error) X-PHP-List-Original-Sender: scott@macvicar.net X-Host-Fingerprint: 97.107.131.220 whisky.macvicar.net Linux 2.6 Received: from [97.107.131.220] ([97.107.131.220:53269] helo=whisky.macvicar.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/F0-58541-C83453C4 for ; Wed, 07 Jul 2010 23:18:37 -0400 Received: from [192.168.0.33] (unknown [173.153.61.92]) by whisky.macvicar.net (Postfix) with ESMTP id 083BA46A51; Wed, 7 Jul 2010 23:18:33 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii X-Priority: 3 In-Reply-To: Date: Wed, 7 Jul 2010 20:18:30 -0700 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <41062215-1091-47AA-B431-B33F1823DE2A@macvicar.net> References: <1430e929de312057f8a7788560e7c92f.squirrel@www.l-i-e.com> <4C34AA60.7070707@ingres.com> To: Shijiang X-Mailer: Apple Mail (2.1078) Subject: Re: [PHP-DEV] Single-line comment problem From: scott@macvicar.net (Scott MacVicar) The scanner is looking for \r \n % if ASP tags are enabled or ?> before = it marks the end of the comment. Take the following I am HTML, hear me roar! Parsing ends with ?> regardless if its a comment or not but its not = context sensitive. It can't understand that its within a string. - S On Jul 7, 2010, at 7:26 PM, Shijiang wrote: > Hi > I'm not sure whether it's really a bug. > The following sample code will emit a parse error.=20 > if(true){ > //echo ''; > echo 'afafa'; > } > ?> >=20 > The parser treate the PHP tag within the commented line as a normal = tag . >=20 >=20 >=20 >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20