[PHP] Is this a bug?!!! I cna't believe! Sorry, if im wrong...

2005-01-30 Thread news.php.net
? class A { var $name; function A($str) { $this-name = $str; } } $arr = array(); //Put to array to objects of class A, // where their attribute A::a is assigned a different value //objects are assigned to an array by reference $a = new A(qaz); $arr[0] = $a; $a = new A(wsx);

Re: [PHP] Is this a bug?!!! I cna't believe! Sorry, if im wrong...

2005-01-30 Thread Marek Kilimajer
No news.php.net wrote: ? class A { var $name; function A($str) { $this-name = $str; } } $arr = array(); //Put to array to objects of class A, // where their attribute A::a is assigned a different value //objects are assigned to an array by reference $a = new A(qaz); $arr[0] = $a;

Re: [PHP] Is this a bug?!!! I cna't believe! Sorry, if im wrong...

2005-01-30 Thread news.php.net
No news.php.net wrote: ? class A { var $name; function A($str) { $this-name = $str; } } $arr = array(); //Put to array to objects of class A, // where their attribute A::a is assigned a different value //objects are assigned to an array by reference $a = new

Re: [PHP] Is this a bug?!!! I cna't believe! Sorry, if im wrong...

2005-01-30 Thread Jochem Maas
I did a little experimenting, and it looks like foreach is misbehaving, but may I just don't get it, anyway check this out (my php version and output are below): class A { var $name; function A($str) { $this-name = $str; } } // does not work as expected. $arr = array(); $a = new A(qaz); $arr[0] =

Re: [PHP] Is this a bug?!!! I cna't believe! Sorry, if im wrong...

2005-01-30 Thread Santa
30 2005 16:07 news.php.net (a): ? class A { var $name; function A($str) { $this-name = $str; } } $arr = array(); //Put to array to objects of class A, // where their attribute A::a is assigned a different value //objects are assigned to an array by reference