From: [EMAIL PROTECTED] Operating system: All PHP version: 4.1.1 PHP Bug Type: *General Issues Bug description: count($array) logical error
Hello, Funny logical error: if we have a simple variable, say $x = 1 then count($x) == 1, which is "natural" (I don't think so) And if we have an array $x[0] = 1; count($x) == 1, but after UnSet($x[0]) we still have count($x) = 1! This leads to a very special kind of logical errors which are really hard to track. My suggestion: either: introduce explicit type system (with unions, structs and arrays ;) or: disable count on variables -- Edit bug report at http://bugs.php.net/?id=16045&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16045&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16045&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16045&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16045&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16045&r=support Expected behavior: http://bugs.php.net/fix.php?id=16045&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16045&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16045&r=submittedtwice