3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function fMember($a,$b) { return $a+$b; } function demoMember() { $g = array($this, 'fMember'); echo $g(1,1); } } $t = new Test(); $t->demoMember();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/as5Qc
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         !0, 'demoMember'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function fmember:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/as5Qc
function name:  fMember
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ADD                                              ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function fmember

Function demomember:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/as5Qc
function name:  demoMember
number of ops:  10
compiled vars:  !0 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_THIS                                       ~1      
          1        INIT_ARRAY                                       ~2      ~1
          2        ADD_ARRAY_ELEMENT                                ~2      'fMember'
          3        ASSIGN                                                   !0, ~2
    7     4        INIT_DYNAMIC_CALL                                        !0
          5        SEND_VAL_EX                                              1
          6        SEND_VAL_EX                                              1
          7        DO_FCALL                                      0  $4      
          8        ECHO                                                     $4
    8     9      > RETURN                                                   null

End of function demomember

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.02 ms | 1423 KiB | 13 Q