3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test () { $this->myNewVar = 35; } public function printVar () { echo $this->myNewVar; } } $obj = new A; $obj->test(); $obj->printVar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D9XBn
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   19     5        INIT_METHOD_CALL                                         !0, 'printVar'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D9XBn
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN_OBJ                                               'myNewVar'
          1        OP_DATA                                                  35
    9     2      > RETURN                                                   null

End of function test

Function printvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D9XBn
function name:  printVar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'myNewVar'
          1        ECHO                                                     ~0
   14     2      > RETURN                                                   null

End of function printvar

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.27 ms | 1394 KiB | 13 Q