#25432 [WFx]: Weird behavior with objects and references
| From: | alex at primafila dot net | Date: | Mon, 08 Sep 2003 13:55:04 +0000 |
| Subject: | #25432 [WFx]: Weird behavior with objects and references | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47260@lists.php.net to get a copy of this message | ||
ID: 25432
User updated by: alex at primafila dot net
Reported By: alex at primafila dot net
Status: Wont fix
Bug Type: Scripting Engine problem
Operating System: RedHat, MacOS X
PHP Version: 4.3.3
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2003-09-08 08:45:18] 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 08:25:35] 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"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25432&edit=1