3v4l.org

run code in 500+ PHP versions simultaneously
<?php class c1 { public function fun(){ var_dump('fun'); } } $n = new c1(); $n->fun = function(){ var_dump('222'); }; ($n->fun)(); ($n->anotherFun)();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fcBo1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $n
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $1      'c1'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   10     3        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          4        ASSIGN_OBJ                                                   !0, 'fun'
   12     5        OP_DATA                                                      ~5
   14     6        FETCH_OBJ_R                                          ~6      !0, 'fun'
          7        INIT_DYNAMIC_CALL                                            ~6
          8        DO_FCALL                                          0          
   16     9        FETCH_OBJ_R                                          ~8      !0, 'anotherFun'
         10        INIT_DYNAMIC_CALL                                            ~8
         11        DO_FCALL                                          0          
         12      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fcBo1
function name:  {closure:/in/fcBo1:10}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                                   'var_dump'
          1        SEND_VAL                                                     '222'
          2        DO_ICALL                                                     
   12     3      > RETURN                                                       null

End of Dynamic Function 0

Class c1:
Function fun:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fcBo1
function name:  fun
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                                   'var_dump'
          1        SEND_VAL                                                     'fun'
          2        DO_ICALL                                                     
    6     3      > RETURN                                                       null

End of function fun

End of class c1.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
148.39 ms | 1936 KiB | 14 Q