3v4l.org

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

Class Test:
Function getvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZIpbe
function name:  getVar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'var'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function getvar

Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZIpbe
function name:  setVar
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ASSIGN_OBJ                                               'var'
          2        OP_DATA                                                  !0
   12     3      > RETURN                                                   null

End of function setvar

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.6 ms | 1394 KiB | 13 Q