#19006 [Opn->Csd]: Test failure orange/banana
| From: | helly@php.net | Date: | Wed, 21 Aug 2002 10:43:55 +0000 |
| Subject: | #19006 [Opn->Csd]: Test failure orange/banana | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17428@lists.php.net to get a copy of this message | ||
ID: 19006
Updated by: helly@php.net
Reported By: msopacua@idg.nl
-Status: Open
+Status: Closed
Bug Type: Arrays related
Operating System: BSD/OS
PHP Version: 4CVS-2002-08-20
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-08-21 03:50:09] msopacua@idg.nl
Sorry for the screwed output,
the expected output, expects an int(0) (the result of array_sum). But
since array_sum no longer changes the actual array, the array remains
in tact as 'string[6] => banana'.
------------------------------------------------------------------------
[2002-08-21 03:46:54] msopacua@idg.nl
Ok - got it, see the note for array_sum in the manual:
" PHP versions prior to 4.0.6 modified the passed array itself and
converted strings to numbers (which most of the time converted them to
zero, depending on their value)."
The expected output, is expecting exactly that:
-- Testing uasort() -- --
Testing uasort() --
array(7) {
array(7) {
[-2147483648]=>
[-2147483648]=>
float(-0.33333333333333)
float(-0.33333333333333)
["-2147483648"]=>
["-2147483648"]=>
array(2) {
array(2) {
[0]=>
[0]=>
int(0) |
string(6) "banana"
[1]=>
[1]=>
int(0) |
string(6) "orange"
} }
------------------------------------------------------------------------
[2002-08-21 03:34:53] msopacua@idg.nl
Ok, strike that last one.
With sdiff, it became clearer.
Seems that the problem is in array_sum rather than the ua* functions.
I'll look into it.
------------------------------------------------------------------------
[2002-08-21 02:55:26] msopacua@idg.nl
Yes. This one always fails. Since the output is quite lengthly and
generated by multiple array functions, it's hard to pin down the actual
problem.
So, IMO the test should be split into three seperate tests for the
respective functions and then this one. Maybe it is the combination of
the functions, maybe it's print_r, maybe it's one seperate one.
No way to tell now.
------------------------------------------------------------------------
[2002-08-20 21:45:39] sniper@php.net
Can you explain this a bit?? What's the problem?
Was this one of those tests that has failed always?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19006
--
Edit this bug report at http://bugs.php.net/?id=19006&edit=1