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 { try { echo 'Start finally block' . PHP_EOL; $foo = new Foo(); echo 'End finally block' . PHP_EOL; } catch (Throwable $ex) { echo 'Finally catch ' . $ex->getMessage() . PHP_EOL; throw $ex; } } } catch (\Throwable $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: 16
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 25
Branch analysis from position: 25
2 jumps found. (Code = 107) Position 1 = 26, Position 2 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iWbXF
function name:  (null)
number of ops:  33
compiled vars:  !0 = $foo, !1 = $ex, !2 = $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%2FiWbXF%3A2%240'
    4     2        SEND_VAL                                                 ~3
          3        DO_ICALL                                                 
    8     4        NEW                                              $6      'RuntimeException'
          5        SEND_VAL_EX                                              'Error+message'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $6
    9     8*       FAST_CALL                                                ->10
          9*       JMP                                                      ->24
   12    10*       ECHO                                                     'Start+finally+block%0A'
   14    11*       NEW                                              $8      'Foo'
         12*       DO_FCALL                                      0          
         13*       ASSIGN                                                   !0, $8
   16    14*       ECHO                                                     'End+finally+block%0A'
         15*       JMP                                                      ->23
   17    16  E > > CATCH                                       last         'Throwable'
   18    17    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         18        DO_FCALL                                      0  $11     
         19        CONCAT                                           ~12     'Finally+catch+', $11
         20        CONCAT                                           ~13     ~12, '%0A'
         21        ECHO                                                     ~13
   19    22      > THROW                                         0          !1
         23*       FAST_RET                                                 
         24*       JMP                                                      ->32
   23    25  E > > CATCH                                       last         'Throwable'
   24    26    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         27        DO_FCALL                                      0  $14     
         28        CONCAT                                           ~15     $14, '%0A'
         29        ECHO                                                     ~15
   25    30        CONCAT                                           ~16     !2, '%0A'
         31        ECHO                                                     ~16
   26    32      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FiWbXF%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iWbXF
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%2FiWbXF%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.87 ms | 1400 KiB | 15 Q