|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25432 Weird behavior with objects and references
Submitted: 2003-09-08 08:25 UTC Modified: 2003-09-08 09:55 UTC
From: alex at primafila dot net Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.3.3 OS: RedHat, MacOS X
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
15 + 2 = ?
Subscribe to this entry?

 [2003-09-08 08:25 UTC] alex at primafila dot net
Weird behavior with objects and references.

Reproduce code:

Expected result:
array(1) {
  string(6) "strong"
array(1) {
  string(6) "strong"

Actual result:
array(1) {
  &string(6) "strong"
array(1) {
  &string(4) "type"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-08 08:45 UTC]
That's what you get when you play around with references without understanding how they work in PHP.
In PHP 5 your script works as you expect. Won't be fixed in PHP 4.

 [2003-09-08 09:55 UTC] alex at primafila dot net
Well, actually I'm playing with references without 
knowing how buggy they are (they are not 'working' as 
you say). There is no documentation that make me 
understand 'how they work in PHP'.

No flame, enjoy your day.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 16 10:05:45 2022 UTC