3v4l.org

run code in 300+ PHP versions simultaneously
<?php array_map(function ($i) { eval("class {$i}Exception extends Exception { }"); }, explode(' ', 'Foo Bar')); try { throw new FooException('foo'); } catch (FooException $e) { throw new BarException('bar'); } catch (BarException $e) { echo 'hallo!'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 107) Position 1 = 21, Position 2 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 20
Branch analysis from position: 20
filename:       /in/ttjZJ
function name:  (null)
number of ops:  23
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_map'
          1        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
    5     2        SEND_VAL                                                 ~1
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAL                                                 'Foo+Bar'
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
    3     8        DO_ICALL                                                 
    8     9        NEW                                              $4      'FooException'
         10        SEND_VAL_EX                                              'foo'
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $4
         13*       JMP                                                      ->22
    9    14  E > > CATCH                                                    'FooException', ->20
   10    15    >   NEW                                              $6      'BarException'
         16        SEND_VAL_EX                                              'bar'
         17        DO_FCALL                                      0          
         18      > THROW                                         0          $6
         19*       JMP                                                      ->22
   11    20  E > > CATCH                                       last         'BarException'
   12    21    >   ECHO                                                     'hallo%21'
   13    22      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ttjZJ
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ROPE_INIT                                     3  ~2      'class+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, 'Exception+extends+Exception+%7B+%7D'
          4        INCLUDE_OR_EVAL                                          ~1, EVAL
    5     5      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.76 ms | 1447 KiB | 15 Q