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) { for($i=0; $i<10; ++$i) $c[0]->$c[1]($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/p3ZCk
function name:  (null)
number of ops:  11
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        ASSIGN_OBJ                                               !0, 'p'
          4        OP_DATA                                                  'X'
   23     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 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/p3ZCk
function name:  f
number of ops:  13
compiled vars:  !0 = $c, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->10
   17     3    >   FETCH_DIM_R                                      ~3      !0, 0
          4        FETCH_OBJ_R                                      ~4      ~3, !0
          5        FETCH_DIM_R                                      ~5      ~4, 1
          6        INIT_DYNAMIC_CALL                                        ~5
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
   16     9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 10
         11      > JMPNZ                                                    ~8, ->3
   18    12    > > 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/p3ZCk
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:
176.52 ms | 1398 KiB | 14 Q