ID:               46492
 Updated by:       [EMAIL PROTECTED]
 Reported By:      email at davekok dot nl
-Status:           Open
+Status:           Bogus
 Bug Type:         SPL related
 Operating System: linux 2.6
 PHP Version:      5.2.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

array() is not an object of any class. Hence, it can't implement any
interface such as Traversable.

You probably want: is_array($o) || $o instanceof Traversable


Previous Comments:
------------------------------------------------------------------------

[2008-11-05 09:37:37] email at davekok dot nl

Description:
------------
When executing the expression

(array() instanceof Traversable)

it results in false.

I'm not really sure if an array is seen as an object in PHP. But since
there is no function like is_traversable. I expected this to work.


Reproduce code:
---------------
$a = array();

return ($a instanceof Traversable)


Expected result:
----------------
true

Actual result:
--------------
false


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46492&edit=1

Reply via email to