3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myTapFunction($value) { tempFn($value); return $value; } function tempFn($value) { return $value->increment(5); } class Test { public $val = 0; public function increment($val) { $this->val += $val; } } $a = new Test(); var_dump( myTapFunction($a) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vMhfc
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'mytapfunction'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function mytapfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vMhfc
function name:  myTapFunction
number of ops:  6
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL_BY_NAME                                       'tempFn'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    7     4      > RETURN                                                   !0
    8     5*     > RETURN                                                   null

End of function mytapfunction

Function tempfn:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vMhfc
function name:  tempFn
number of ops:  6
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_METHOD_CALL                                         !0, 'increment'
          2        SEND_VAL_EX                                              5
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
   13     5*     > RETURN                                                   null

End of function tempfn

Class Test:
Function increment:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vMhfc
function name:  increment
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        ASSIGN_OBJ_OP                                 1          'val'
          2        OP_DATA                                                  !0
   19     3      > RETURN                                                   null

End of function increment

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.8 ms | 1013 KiB | 15 Q