php.net |  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
Have you experienced this issue?
Rate the importance of this bug to you:

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

Reproduce code:
---------------
http://alex.primafila.net/bug-sample.phps

Expected result:
----------------
array(1) {
  ["type"]=>
  string(6) "strong"
}
array(1) {
  ["type"]=>
  string(6) "strong"
}

Actual result:
--------------
array(1) {
  ["type"]=>
  &string(6) "strong"
}
array(1) {
  ["type"]=>
  &string(4) "type"
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-08 08:45 UTC] sniper@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC