php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xdesign at hotmal dot com
New email:
PHP Version: OS:

 

 [2000-05-14 14:50 UTC] xdesign at hotmal dot com
for($i=0; $i<3; $i++) {                         
  if(($row[$i+11] != "") || ($row[$i+19] != "")) {
    print("<tr><td>");
    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.

Patches

Pull Requests

History

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: Mon Nov 11 14:01:30 2024 UTC