This isn't a bug. All those strings evaluate to 0.
You should use a sort() function which is suitable.
At 02:48 PM 7/27/2004 -0500, John Coggeshall wrote:
Consider the following:
0, 'b'=>1, 'c'=>2);
sort($a);
print_r($a);
?>
This produces a bogus output:
Array
(
[0] => a
[1] =>
Hi All,
tests/run-test/test005.phpt is failing in PHP-5.0.0 linux.
The log of test execution is pasted below.
EXPECTED OUTPUT
string(1) "1"
string(4) "4095"
string(1) "0"
string(1) "1"
string(1) "0"
NULL
string(%d) "%sivision by zer%s"
ACTUAL OUTPUT
string(1) "1"
string(4) "2047"
string(
On Tue, Jul 27, 2004 at 02:48:28PM -0500, John Coggeshall wrote:
> Notice how 0 and c are switched incorrectly. Attached is a patch to
> zend_operators.c that fixes it.
The Manual says:
> Warning
>
> Be carefull when sorting arrays with mixed types values because sort()
> can produce unpredict
attached
--- /home/john/working/php-src/Zend/zend_operators.c2004-07-27 11:15:55.0
-0400
+++ /home/john/usbdrive/zend_operators.c2004-07-26 02:01:54.0 -0400
@@ -1251,6 +1251,9 @@
zend_free_obj_get_result(op2, free_op2); \
Consider the following:
0, 'b'=>1, 'c'=>2);
sort($a);
print_r($a);
?>
This produces a bogus output:
Array
(
[0] => a
[1] => b
[2] => 0
[3] => c
[4] => 1
[5] => 2
)
Notice how 0 and c are switched incorrectly. Attached is a patch to
zend_operators.c that fi
Hello,
I discovered these problems during a project I'm working on. There are
three separate patches involving different areas of the odbc module:
php_odbc.c.patch1.txt
=
Wherever an odbc_result is allocated, "emalloc" is used. This may cause
random
behavior in certain php_odbc
Yep it's intended.
At 03:02 AM 7/27/2004 +, Curt Zirzow wrote:
In light of bug#29306 (http://php.net/29306), I looked at zend_atoi
and found that it uses strtol which treats numbers prefixed with 0
as octal, according to my docs on BSD. Can i get a confirmation
that this is standard strtol beh
Trying again with a link to the file:
Just ran it through valgrind with the options that Rasmus suggested
and got a output file: http://www.ikomm.no/valgrind/out.pid27848 I
can see what'
happening, but have no idea where to go from here.
Can someone have a look at it?
Cheers
> > If the segfault