#25976 [Opn]: $array[] = $otherarray does not work as expected

2003-10-27 Thread k . schroeder
 ID:   25976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Arrays related
-Operating System: unknown
+Operating System: Linux
-PHP Version:  5CVS-2003-10-24 (dev)
+PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

Hi Antony,

see http://kai.cowiki.org/_info.php for details.


Previous Comments:


[2003-10-27 01:20:28] [EMAIL PROTECTED]

Please, provide more info about your config and OS.
What version of apache do you use?
Have you try this examples with PHP-CLI ?



[2003-10-24 14:55:07] [EMAIL PROTECTED]

I've updated my PHP version from CVS and rebuild, but same problem. See
http://kai.cowiki.org/tests/test.array.php and
http://kai.cowiki.org/tests/test.array2.php.



[2003-10-24 11:34:16] tony2001 at phpclub dot net

Try to update your PHP from CVS, to run ./cvsclean and to build it once
more.
I can't reproduce this with latest CVS.



[2003-10-24 09:46:10] [EMAIL PROTECTED]

Description:

See expected and actual result to find out the difference. With CGI
build from same source both examples work as expected.

Reproduce code:
---
example 1:
?php
$aTestInner = array();
$aTestInner['foo'] = 'content of $aTestInner[\'foo\']';
$aTestInner['bar'] = 'content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

example 2:
?php
for ($iLoop = 0; $iLoop  3; $iLoop++) {
$aTestInner = array();
$aTestInner['foo'] = $iLoop . ': content of $aTestInner[\'foo\']';
$aTestInner['bar'] = $iLoop . ': content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
}

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

Expected result:

example 1:
array(3) {
  [0]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(2) {
[foo]=
string(32) 0: content of $aTestInner['foo']
[bar]=
string(32) 0: content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(32) 1: content of $aTestInner['foo']
[bar]=
string(32) 1: content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(32) 2: content of $aTestInner['foo']
[bar]=
string(32) 2: content of $aTestInner['bar']
  }
}

Actual result:
--
example 1:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(0) {
  }
  [2]=
  array(0) {
  }
}





-- 
Edit this bug report at http://bugs.php.net/?id=25976edit=1


#25976 [Opn]: $array[] = $otherarray does not work as expected

2003-10-27 Thread tony2001
 ID:   25976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

Sorry, I get Connection refused by this URL all time.


Previous Comments:


[2003-10-27 06:00:19] [EMAIL PROTECTED]

Hi Antony,

see http://kai.cowiki.org/_info.php for details.



[2003-10-27 01:20:28] [EMAIL PROTECTED]

Please, provide more info about your config and OS.
What version of apache do you use?
Have you try this examples with PHP-CLI ?



[2003-10-24 14:55:07] [EMAIL PROTECTED]

I've updated my PHP version from CVS and rebuild, but same problem. See
http://kai.cowiki.org/tests/test.array.php and
http://kai.cowiki.org/tests/test.array2.php.



[2003-10-24 11:34:16] tony2001 at phpclub dot net

Try to update your PHP from CVS, to run ./cvsclean and to build it once
more.
I can't reproduce this with latest CVS.



[2003-10-24 09:46:10] [EMAIL PROTECTED]

Description:

See expected and actual result to find out the difference. With CGI
build from same source both examples work as expected.

Reproduce code:
---
example 1:
?php
$aTestInner = array();
$aTestInner['foo'] = 'content of $aTestInner[\'foo\']';
$aTestInner['bar'] = 'content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

example 2:
?php
for ($iLoop = 0; $iLoop  3; $iLoop++) {
$aTestInner = array();
$aTestInner['foo'] = $iLoop . ': content of $aTestInner[\'foo\']';
$aTestInner['bar'] = $iLoop . ': content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
}

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

Expected result:

example 1:
array(3) {
  [0]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(2) {
[foo]=
string(32) 0: content of $aTestInner['foo']
[bar]=
string(32) 0: content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(32) 1: content of $aTestInner['foo']
[bar]=
string(32) 1: content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(32) 2: content of $aTestInner['foo']
[bar]=
string(32) 2: content of $aTestInner['bar']
  }
}

Actual result:
--
example 1:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(0) {
  }
  [2]=
  array(0) {
  }
}





-- 
Edit this bug report at http://bugs.php.net/?id=25976edit=1


#25976 [Opn]: $array[] = $otherarray does not work as expected

2003-10-26 Thread tony2001
 ID:   25976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Arrays related
 Operating System: unknown
 PHP Version:  5CVS-2003-10-24 (dev)
 New Comment:

Please, provide more info about your config and OS.
What version of apache do you use?
Have you try this examples with PHP-CLI ?


Previous Comments:


[2003-10-24 14:55:07] [EMAIL PROTECTED]

I've updated my PHP version from CVS and rebuild, but same problem. See
http://kai.cowiki.org/tests/test.array.php and
http://kai.cowiki.org/tests/test.array2.php.



[2003-10-24 11:34:16] tony2001 at phpclub dot net

Try to update your PHP from CVS, to run ./cvsclean and to build it once
more.
I can't reproduce this with latest CVS.



[2003-10-24 09:46:10] [EMAIL PROTECTED]

Description:

See expected and actual result to find out the difference. With CGI
build from same source both examples work as expected.

Reproduce code:
---
example 1:
?php
$aTestInner = array();
$aTestInner['foo'] = 'content of $aTestInner[\'foo\']';
$aTestInner['bar'] = 'content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

example 2:
?php
for ($iLoop = 0; $iLoop  3; $iLoop++) {
$aTestInner = array();
$aTestInner['foo'] = $iLoop . ': content of $aTestInner[\'foo\']';
$aTestInner['bar'] = $iLoop . ': content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
}

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

Expected result:

example 1:
array(3) {
  [0]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(2) {
[foo]=
string(32) 0: content of $aTestInner['foo']
[bar]=
string(32) 0: content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(32) 1: content of $aTestInner['foo']
[bar]=
string(32) 1: content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(32) 2: content of $aTestInner['foo']
[bar]=
string(32) 2: content of $aTestInner['bar']
  }
}

Actual result:
--
example 1:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(0) {
  }
  [2]=
  array(0) {
  }
}





-- 
Edit this bug report at http://bugs.php.net/?id=25976edit=1


#25976 [Opn]: $array[] = $otherarray does not work as expected

2003-10-24 Thread k . schroeder
 ID:   25976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Arrays related
-Operating System: Linux
+Operating System: unknown
 PHP Version:  5CVS-2003-10-24 (dev)
 New Comment:

I've updated my PHP version from CVS and rebuild, but same problem. See
http://kai.cowiki.org/tests/test.array.php and
http://kai.cowiki.org/tests/test.array2.php.


Previous Comments:


[2003-10-24 11:34:16] tony2001 at phpclub dot net

Try to update your PHP from CVS, to run ./cvsclean and to build it once
more.
I can't reproduce this with latest CVS.



[2003-10-24 09:46:10] [EMAIL PROTECTED]

Description:

See expected and actual result to find out the difference. With CGI
build from same source both examples work as expected.

Reproduce code:
---
example 1:
?php
$aTestInner = array();
$aTestInner['foo'] = 'content of $aTestInner[\'foo\']';
$aTestInner['bar'] = 'content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;
$aTestOuter[] = $aTestInner;

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

example 2:
?php
for ($iLoop = 0; $iLoop  3; $iLoop++) {
$aTestInner = array();
$aTestInner['foo'] = $iLoop . ': content of $aTestInner[\'foo\']';
$aTestInner['bar'] = $iLoop . ': content of $aTestInner[\'bar\']';

$aTestOuter[] = $aTestInner;
}

echo 'pre';
var_dump($aTestOuter);
echo '/pre';
?

Expected result:

example 1:
array(3) {
  [0]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(2) {
[foo]=
string(32) 0: content of $aTestInner['foo']
[bar]=
string(32) 0: content of $aTestInner['bar']
  }
  [1]=
  array(2) {
[foo]=
string(32) 1: content of $aTestInner['foo']
[bar]=
string(32) 1: content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(32) 2: content of $aTestInner['foo']
[bar]=
string(32) 2: content of $aTestInner['bar']
  }
}

Actual result:
--
example 1:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
  [2]=
  array(2) {
[foo]=
string(29) content of $aTestInner['foo']
[bar]=
string(29) content of $aTestInner['bar']
  }
}

example 2:
array(3) {
  [0]=
  array(0) {
  }
  [1]=
  array(0) {
  }
  [2]=
  array(0) {
  }
}





-- 
Edit this bug report at http://bugs.php.net/?id=25976edit=1