|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4443 inconsistant parsing
Submitted: 2000-05-14 14:50 UTC Modified: 2000-05-21 17:16 UTC
From: xdesign at hotmal dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.16 OS: rh linux 6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
44 + 5 = ?
Subscribe to this entry?

 [2000-05-14 14:50 UTC] xdesign at hotmal dot com
for($i=0; $i<3; $i++) {                         
  if(($row[$i+11] != "") || ($row[$i+19] != "")) {
    if($row[$i+11] != "") {
      $tmp = $i + 11;
      print("<table width=100%><tr><td>$row[$tmp]</td>");
      $tmp = $i + 15;
      print("<td align=right>($row[$i+11])</td></tr></table>\n");


In the sample above, the reference to $row[$tmp] works fine but the more direct $row[$i+11] doesn't and returns a parsing error saying:

Parse error: parse error, expecting `']'' in /home/httpd/html/xxx.html on line 47

As you can see, I have devised a work-around to the problem but I cannot easily see that I have made a mistake in it.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-21 17:16 UTC] jimw at cvs dot php dot net
you can't place arbitrary expressions inside a double-quoted string.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 00:01:28 2024 UTC