3v4l.org

run code in 300+ PHP versions simultaneously
<?php function tescik(ArrayObject $ao) { //$ao['foo2'] = 'kaboom'; throw new Exception('kaboom'); } $obj = new ArrayObject(array('foo1' => 'bar1', 'foo2' => 'bar2'), ArrayObject::ARRAY_AS_PROPS); echo "\n\n"; echo "before:"; var_dump($obj); $obj2 = clone $obj; try { $obj2 = tescik($obj2); } catch(Exception $e) { } echo "after:"; var_dump($obj2); echo "\n\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) 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
filename:       /in/Fdfe3
function name:  (null)
number of ops:  24
compiled vars:  !0 = $obj, !1 = $obj2, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'ArrayObject'
          1        SEND_VAL_EX                                              <array>
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   11     5        ECHO                                                     '%0A%0A'
   13     6        ECHO                                                     'before%3A'
   14     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   16    10        CLONE                                            ~7      !0
         11        ASSIGN                                                   !1, ~7
   18    12        INIT_FCALL                                               'tescik'
         13        SEND_VAR                                                 !1
         14        DO_FCALL                                      0  $9      
         15        ASSIGN                                                   !1, $9
         16      > JMP                                                      ->18
   19    17  E > > CATCH                                       last         'Exception'
   21    18    >   ECHO                                                     'after%3A'
   22    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   24    22        ECHO                                                     '%0A%0A'
         23      > RETURN                                                   1

Function tescik:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/Fdfe3
function name:  tescik
number of ops:  6
compiled vars:  !0 = $ao
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'kaboom'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
    7     5*     > RETURN                                                   null

End of function tescik

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.54 ms | 1399 KiB | 16 Q