3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function doFoo(int &$e) { try { throw new \Exception(); } catch (\Exception $e) { } } } $foo = new Foo(); $a = 1; $foo->doFoo($a); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q4dFb
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   NEW                                                  $2      'Foo'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   17     3        ASSIGN                                                       !1, 1
   18     4        INIT_METHOD_CALL                                             !0, 'doFoo'
          5        SEND_VAR_EX                                                  !1
          6        DO_FCALL                                          0          
   19     7        INIT_FCALL                                                   'var_dump'
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                                     
         10      > RETURN                                                       1

Class Foo:
Function dofoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q4dFb
function name:  doFoo
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    8     1        NEW                                                  $1      'Exception'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $1
          4*       JMP                                                          ->6
    9     5  E > > CATCH                                           last         'Exception'
   12     6    > > RETURN                                                       null

End of function dofoo

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.09 ms | 1124 KiB | 14 Q