|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: alex at primafila dot net
New email:
PHP Version: OS:


 [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 14:05:50 2022 UTC