title: PHP using objects instead of arrays
body: <p>When I started to learn OOP programming I read that everything is an object. For the most time I develop in PHP. Arrays have important role here. In languages like C# in most cases you really have to use and pass objects not arrays.</p>
  
  <p>For example:</p>
  
  <pre><code>Class Product
  {
      private $data = array();
  
      public function __construct()
      {
          $this-&gt;data['setting_1'] = 'a';
          $this-&gt;data['setting_2'] = 'b';
          $this-&gt;data['setting_3'] = 'c';
          $this-&gt;data['setting_4'] = 'd';
          $this-&gt;data['setting_5'] = 'e';
  
      }
  }
  </code></pre>
  
  <p>Is there any sense to create classes for everything when you use PHP? For example:</p>
  
  <pre><code>Class Product
  {
      private $setting_1, $setting_2,  $setting_3,  $setting_4,  $setting_5; 
  }
  </code></pre>
  
  <p>And then instantiate class Product in another class (eg. Model) and return object instead of array (eg. to Controller)?</p>