title: Error: Unexpected $this in PHP Code
body: <p>I have two PHP scripts, <code>dispatcher.php</code> and <code>processor.php</code> (there are more, but I've commented the others out because they're not necessary at the moment).</p>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected '$this' (T_VARIABLE) in /----home directory-----/classes/processor.php on line 12</p>
  </blockquote>
  
  <p>Here's the code for processor.php:</p>
  
  <pre><code>class Processor{
  
      protected $player;
      protected $name;
      protected $id;
  
      function __construct(){
      }
  
      function loadvars($request){
          $this-&gt;loadvar($this-&gt;name, $request, "name");
      }
  
      private function loadvar($target, $request, $name){
          if(isset($request[$name])){
              $target = $request[$name];
          }
          else{
              $target = "";
          }
      }
  }
  </code></pre>
  
  <p>this is the code for dispatcher.php:</p>
  
  <pre><code>require('classes/processor.php');
  
  $test = new Processor();
  $test-&gt;loadvars($_GET);
  </code></pre>
  
  <p>I don't see why this error occurs?</p>
  
  <p>I'm coding using Sublime on Windows, if that matters.</p>