3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { var $p; function m($v) { echo $this->p, $v, "\n"; } } function f($c) { $c = $c[0]->{$c[1]}; for($i=0; $i<10; ++$i) $c($i); } $c = new C(); $c->p = 'X'; f(array(&$c, 'm'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M9CdL
function name:  (null)
number of ops:  11
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        ASSIGN_OBJ                                               !0, 'p'
          4        OP_DATA                                                  'X'
   24     5        INIT_FCALL                                               'f'
          6        INIT_ARRAY                                       ~5      !0
          7        ADD_ARRAY_ELEMENT                                ~5      'm'
          8        SEND_VAL                                                 ~5
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 7
Branch analysis from position: 13
Branch analysis from position: 7
filename:       /in/M9CdL
function name:  f
number of ops:  14
compiled vars:  !0 = $c, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        FETCH_DIM_R                                      ~3      !0, 1
          2        FETCH_DIM_R                                      ~2      !0, 0
          3        FETCH_OBJ_R                                      ~4      ~2, ~3
          4        ASSIGN                                                   !0, ~4
   17     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->11
   18     7    >   INIT_DYNAMIC_CALL                                        !0
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
   17    10        PRE_INC                                                  !1
         11    >   IS_SMALLER                                               !1, 10
         12      > JMPNZ                                                    ~9, ->7
   19    13    > > RETURN                                                   null

End of function f

Class C:
Function m:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M9CdL
function name:  m
number of ops:  6
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      'p'
          2        ECHO                                                     ~1
          3        ECHO                                                     !0
          4        ECHO                                                     '%0A'
   10     5      > RETURN                                                   null

End of function m

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.42 ms | 1390 KiB | 14 Q