title: Can't use the method return value in write context
body: <p>I'm using codeigniter and trying to make an if statement for if the controllers have changed. What I have right now gives the error.</p>
  
  <pre><code>if (isset($this-&gt;session-&gt;userdata('lastUrl')) &amp;&amp; $this-&gt;session-&gt;userdata('lastUrl') != $this-&gt;router-&gt;class) {
       echo 'new controller';
  }
  
  $this-&gt;session-&gt;set_userdata('lastUrl', $this-&gt;router-&gt;class);
  </code></pre>
  
  <p>This code is in the constructor of the controller so it will be run on every page.</p>