[PHP-DEV] Bug #418: array function misbehaves if first element is a string containing a number From: sam <email protected>
Date: 05/29/98

From: sam <email protected>
Operating system: Solaris 2.5.1
PHP version: 3.0 Release Candidate 5
PHP Bug Type: Misbehaving function
Bug description:
A string containing a number is being treated the same as a number.

Reproduce with:

$a = array("0", "a", "b");
for (reset($a); $v = current($a); next($a)) {
    echo "$v\n";
}

I would expect this to print three lines with three strings:
0
a
b
instead it prints nothing at all. If the first string is changed from
"0" to "z", it prints three lines as expected. Looks like the string
"0" is being treated the same as the number 0.

do-conf contains:
./configure --with-gd=no --with-sybase=/tools1/pkgs/sybase --with-config-file-path=/web/cgi-bin/RC_internal/phpdir/lib --enable-debug=no --enable-safe-mode=yes --with-exec-dir=/web/cgi-bin/RC_internal/phpdir/scripts --bindir=/web/cgi-bin/RC_internal/phpdir/bin