#33129 [Opn->Bgs]: Error creating object not asigned with array parameters Error
| From: | sniper@php.net | Date: | Wed, 25 May 2005 09:27:16 +0000 |
| Subject: | #33129 [Opn->Bgs]: Error creating object not asigned with array parameters Error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79472@lists.php.net to get a copy of this message | ||
ID: 33129
Updated by: sniper@php.net
Reported By: ariel at liveinteractive dot net
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Fedora
PHP Version: 4.3.11
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2005-05-24 18:40:28] ariel at liveinteractive dot net
Description:
------------
If I create an object without asign it wich creator function receive an
array of created objects, the last object of the array is replaced with
an object *RECURSION*
If I assign the new object it works fine.
I have the same problem with PHP 4.3.10
./configure \
--enable-xml \
--enable-wddx \
--enable-bcmath=shared \
--enable-calendar=shared \
--enable-track-vars \
--enable-trans-sid \
--with-gd \
--with-mysql \
--with-libxml-dir=/usr/local \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-mcrypt=/usr/lib \
--with-zlib \
--with-zlib-dir=/usr/lib \
--enable-sockets \
--with-apxs=/usr/local/apache/bin/apxs
Reproduce code:
---------------
<?php
echo "<pre>";
class A
{
function A($a)
{
print_r($a);
}
}
class B
{
var $b;
function B($b)
{
$this->b = $b;
print_r($this);
}
}
/* $j = */new A(array(new B('1'), new B('2')));
?>
Expected result:
----------------
b Object
(
[b] => 1
)
b Object
(
[b] => 2
)
Array
(
[0] => b Object
(
[b] => 1
)
[1] => b Object
(
[b] => 2
)
)
Actual result:
--------------
b Object
(
[b] => 1
)
b Object
(
[b] => 2
)
Array
(
[0] => b Object
(
[b] => 1
)
[1] => b Object
(
[b] => *RECURSION*
)
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33129&edit=1