Doc #64412 [Fbk->NoF]: empty array evaluates to true instead of false
Edit report at https://bugs.php.net/bug.php?id=64412&edit=1
ID: 64412
Updated by: php-bugs@lists.php.net
Reported by: confidential99 at gmail dot com
Summary: empty array evaluates to true instead of false
-Status: Feedback
+Status: No Feedback
Type: Documentation Problem
Package: Arrays related
Operating System: Linux
PHP Version: Irrelevant
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2013-04-06 21:24:03] wim at sitebase dot be
I've tested it with PHP 5.3.10 and it evaluates correctly to false.
------------------------------------------------------------------------
[2013-03-12 15:24:40] rasmus@php.net
It should definitely be false. I get false under both PHP 5.3 and 5.4. Which
version are you on?
------------------------------------------------------------------------
[2013-03-12 13:23:47] confidential99 at gmail dot com
Description:
------------
The manual (http://www.php.net/manual/en/language.types.boolean.php) states that
an empty array should evaluate to false.
When I run the following code, it evaluates to true. I'm filing this under
documentation bug because I'm not sure if this is intended or not.
Test script:
---------------
var_dump((bool) array());
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64412&edit=1
Thread (4 messages)