title: Replacing PHP ArrayObject
body: <p>I have a PHP file where I am wondering if there is a way to replace ArrayObject with something else? I have the following:</p>
  
  <pre><code>    for ($i = 0; $i &lt;sizeof($compO); ++$i) {
          $cpO[] = self::equal_array($compO[$i]);
             I do a bunch of stuff here
      }
  
      protected static function equal_array($arr){
          $arrayObject = new ArrayObject($arr);
          return $arrayObject-&gt;getArrayCopy();
       }
  </code></pre>
  
  <p>For some reason, the new ArrayObject call in equal_array() is giving me an error that indicates that ArrayObject is not in the namespace. Is there a way to replace the equal_array function with something equivalent or is there a way to correct the namespace problem? I thought ArrayObject was part of PHP so not sure why it isn't found in the namespace. </p>