title: Try block scoping information in php byte code
body: <pre><code>&lt;?php
  echo &quot;A&quot;;
  try {
      echo &quot;B&quot;;
      throw new Exception(&quot;B&quot;);
      try {
          echo &quot;C&quot;;
      } catch(Exception $e) {
          echo &quot;inner&quot;;
      }
      echo &quot;D&quot;;
  } catch(Exception $e) {
      echo &quot;outer&quot;;
  }
  echo &quot;E&quot;;
  ?&gt;
  </code></pre>
  <p>Called with <code>php -dvld.active=1 -dvld.execute=0 -dvld.dump_paths=1 multiple_catch.php 2&gt; multiple_catch.php.byte</code> results in</p>
  <pre><code>number of ops:  16
  compiled vars:  !0 = $e
  line     #* E I O op                           fetch          ext  return  operands
  -------------------------------------------------------------------------------------
      3     0  E &gt;   ECHO                                                     'A'
      7     1        ECHO                                                     'B'
      8     2        NEW                                              $1      'Exception'
            3        SEND_VAL_EX                                              'B'
            4        DO_FCALL                                      0          
            5      &gt; THROW                                         0          $1
     12     6*       ECHO                                                     'C'
            7*       JMP                                                      -&gt;10
     14     8  E &gt; &gt; CATCH                                       last         'Exception'
     15     9    &gt;   ECHO                                                     'inner'
     18    10        ECHO                                                     'D'
           11      &gt; JMP                                                      -&gt;14
     20    12  E &gt; &gt; CATCH                                       last         'Exception'
     21    13    &gt;   ECHO                                                     'outer'
     24    14    &gt;   ECHO                                                     'E'
     27    15      &gt; RETURN                                                   1
  </code></pre>
  <p>However, just naively reading the op column it looks as if an exception thrown by op 5 would lead to the print out of 'inner'. However, when taking the original source into account, this is  obviously wrong as running the source confirms:</p>
  <pre><code>$&gt; php multiple_catch.php
  ABouterE
  </code></pre>
  <p>How does the PHP engine know the try block it is in based on the byte code?</p>