|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7330 variable resolution in double quoted strings doesn't like a hierarchy of object
Submitted: 2000-10-19 03:23 UTC Modified: 2000-10-19 06:55 UTC
From: bbatchel at stetson dot edu Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.2 OS: Linux
Private report: No CVE-ID: None
 [2000-10-19 03:23 UTC] bbatchel at stetson dot edu
I am writing a database wrapper for a project I am working on.  The gist of this system is based on a hirearchy of objects - such as:

           Data (say a string containing 'monkey')

When I do this:


I get:  monkey

When I do this:


I would expect to get:


But instead I get:


I assume that the parser is resolving $Object1->Object2 as the word object, and then concatinating that to '->Data' as a string - instead of going down the line to the rest of the variable.

Not a big deal, per se, but still a bug in my opinion.

For the mean time, I just assign the complex variable to a temporary variable and use that in the string substitution.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-19 06:55 UTC]
Use "<br>{$Object1->Object2->Data}<br>" for this.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 13 16:01:29 2024 UTC