title: Array of objects and instance of a class
body: <p>What would be the best practice to do this :</p>
  
  <pre><code>    class AwesomeClass {
  
              // Code
  
              public function test()
              {
                      foreach($objects-&gt;values as $v)
                      {
                              New SuperClass($v);
                      }
  
                      return $objects;
              }
  
      }
  
      class SuperClass {
              public function __construct($arg2)
              {
                      return trim($arg2);        
              }
      }
  
      $rule_the_world = New AwesomeClass($arg1);
  
      $king = $rule_the_world-&gt;test();
  </code></pre>
  
  <p>The previous code is obviously not working, I think I'm missing some major point of PHP OO.</p>