3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function ($class_name) { echo "Need to include `{$class_name}` \n"; }); try { try { throw new \RuntimeException('Error message'); } finally { echo 'Start finally block' . PHP_EOL; $foo = new Foo(); echo 'End finally block' . PHP_EOL; } } catch (\Exception $e) { echo $e->getMessage() . PHP_EOL; echo $e . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bn1d8
function name:  (null)
number of ops:  25
compiled vars:  !0 = $foo, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBn1d8%3A2%240'
    4     2        SEND_VAL                                                 ~2
          3        DO_ICALL                                                 
    8     4        NEW                                              $5      'RuntimeException'
          5        SEND_VAL_EX                                              'Error+message'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $5
    9     8*       FAST_CALL                                                ->10
          9*       JMP                                                      ->16
   10    10*       ECHO                                                     'Start+finally+block%0A'
   11    11*       NEW                                              $7      'Foo'
         12*       DO_FCALL                                      0          
         13*       ASSIGN                                                   !0, $7
   12    14*       ECHO                                                     'End+finally+block%0A'
         15*       FAST_RET                                                 
         16*       JMP                                                      ->24
   14    17  E > > CATCH                                       last         'Exception'
   15    18    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         19        DO_FCALL                                      0  $10     
         20        CONCAT                                           ~11     $10, '%0A'
         21        ECHO                                                     ~11
   16    22        CONCAT                                           ~12     !1, '%0A'
         23        ECHO                                                     ~12
   17    24      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBn1d8%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bn1d8
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $class_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ROPE_INIT                                     3  ~2      'Need+to+include+%60'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%60+%0A'
          4        ECHO                                                     ~1
    4     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBn1d8%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.46 ms | 1396 KiB | 15 Q