title: Object of class could not be converted while assigning to variable
body: <p>I have the following PHP code:</p>
  
  <pre><code>private $settings;
  
  private function __construct($settings) {
      $this-&gt;$settings = $settings;
  
      print "Created compiler";
  }
  </code></pre>
  
  <p>Where the received $settings is an associative array loaded from a JSON file, the thing is a keep getting this error (Note is implementing a singleton pattern):</p>
  
  <pre><code>Catchable fatal error: Object of class stdClass could not be converted to string
  </code></pre>
  
  <p>I'm sure this is a silly question, but I'm completely stuck at this moment...</p>