3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example1 { protected $v1; protected $v2; public function __construct($a, $b) { $this->v1 = $a; $this->v2 = $b; } protected function get_v1() { return $this->v1; } public function get_v2() { return $this->v2; } } echo $v2->get_v2(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hm6Ml
function name:  (null)
number of ops:  4
compiled vars:  !0 = $v2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_METHOD_CALL                                         !0, 'get_v2'
          1        DO_FCALL                                      0  $1      
          2        ECHO                                                     $1
   35     3      > RETURN                                                   1

Class Example1:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hm6Ml
function name:  __construct
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        ASSIGN_OBJ                                               'v1'
          3        OP_DATA                                                  !0
   14     4        ASSIGN_OBJ                                               'v2'
          5        OP_DATA                                                  !1
   16     6      > RETURN                                                   null

End of function __construct

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

End of function get_v1

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

End of function get_v2

End of class Example1.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.97 ms | 1394 KiB | 13 Q