3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function a(&$var) { $var++; echo $var; } public function b($var) { $temp = $var; $this->a($temp); } } $test = new Test(); $var = 1; $test->b($var);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SQi78
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test, !1 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        ASSIGN                                                   !1, 1
   16     4        INIT_METHOD_CALL                                         !0, 'b'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SQi78
function name:  b
number of ops:  6
compiled vars:  !0 = $var, !1 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ASSIGN                                                   !1, !0
   10     2        INIT_METHOD_CALL                                         'a'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
   11     5      > RETURN                                                   null

End of function b

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.36 ms | 1394 KiB | 13 Q