<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 18 Jun 2013 18:35:11 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: Should is_array() Accept ArrayObject?]]></title>
      <guid>http://www.phpdeveloper.org/news/14818</guid>
      <link>http://www.phpdeveloper.org/news/14818</link>
      <description><![CDATA[<p>
In a <a href="http://blog.stuartherbert.com/php/2010/07/19/should-is_array-accept-arrayobject/">quick blog post</a> today <i>Stuart Herbert</i> asks the community at large a question - should <a href="http://php.net/is_array">is_array</a> accept an <a href="http://us.php.net/arrayobject">ArrayObject</a>?
</p>
<blockquote>
Here's a quick question for the wider PHP programming community '¦ if you're writing code that tests for the presence of an array, should is_array() also accept objects that behave like arrays?
</blockquote>
<p>
Some quick code snippets show that, currently in PHP 5.2, an is_array test will return false. If you use an instanceof to check it, however, you can get it to return true. There's <a href="http://blog.stuartherbert.com/php/2010/07/19/should-is_array-accept-arrayobject/#comments">plenty of comments</a> on the subject with quite a few "no"s in the group.
</p>]]></description>
      <pubDate>Tue, 20 Jul 2010 10:08:09 -0500</pubDate>
    </item>
  </channel>
</rss>
