3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dummy { function __construct($input = array(1,2,3)) { $this->input = $input; } function run() { foreach($this->input as $key=>$value) { if($key == 2) throw new Exception('hello exception'); } } } $dum = new Dummy; $dum->run();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gZVSM
function name:  (null)
number of ops:  6
compiled vars:  !0 = $dum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Dummy'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'run'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Dummy:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gZVSM
function name:  __construct
number of ops:  4
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <array>
    5     1        ASSIGN_OBJ                                               'input'
          2        OP_DATA                                                  !0
    6     3      > RETURN                                                   null

End of function __construct

Function run:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 11
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/gZVSM
function name:  run
number of ops:  13
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~2      'input'
          1      > FE_RESET_R                                       $3      ~2, ->11
          2    > > FE_FETCH_R                                       ~4      $3, !0, ->11
          3    >   ASSIGN                                                   !1, ~4
   12     4        IS_EQUAL                                                 !1, 2
          5      > JMPZ                                                     ~6, ->10
          6    >   NEW                                              $7      'Exception'
          7        SEND_VAL_EX                                              'hello+exception'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $7
   10    10    > > JMP                                                      ->2
         11    >   FE_FREE                                                  $3
   14    12      > RETURN                                                   null

End of function run

End of class Dummy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.62 ms | 1395 KiB | 13 Q