title: token_get_all() function not working properly
body: <p>I want to count the curly brackets in a PHP source code, so i can eventually find the end of a method/function in the given source code.</p>
  
  <p>I was adviced to use the <code>token_get_all()</code> function for this job. But for some reason it isn't splitting the given source into tokens.</p>
  
  <p>I'm using the following code to test it:</p>
  
  <pre><code>&lt;?php
  $str = 'class someClass{
      public $var1;
      private $var2 = null;
  
      public function func1 ( $someVar )
      {
          echo $someVar;
      }
  
      public function func2 ( )
      {
          return false;
      }
  }';
  
  $bla = token_get_all ( $str );
  
  echo '&lt;pre&gt;';
  print_r ( $bla );
  echo '&lt;/pre&gt;';
  ?&gt;
  </code></pre>
  
  <p>But this results in:</p>
  
  <pre><code>Array
  (
      [0] =&gt; 311
      [1] =&gt; class someClass{
      public $var1;
      private $var2 = null;
  
      public function func1 ( $someVar )
      {
          echo $someVar;
      }
  
      public function func2 ( )
      {
          return false;
      }
  }
      [2] =&gt; 1
  )
  </code></pre>
  
  <p>So right now i'm kinda stuck with this. Why doesn't the <code>token_get_all()</code> tokenize the given source code..?</p>