3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class bob{ protected $myitem; function __contruct(){ $myitem = 25; } } class john extends bob{ public function GetItem(){ //echo parent::GetItem(); echo $this->myitem; } } $j = new john(); $j->GetItem();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A4848
function name:  (null)
number of ops:  6
compiled vars:  !0 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'john'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_METHOD_CALL                                         !0, 'GetItem'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class bob:
Function __contruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A4848
function name:  __contruct
number of ops:  2
compiled vars:  !0 = $myitem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 25
    7     1      > RETURN                                                   null

End of function __contruct

End of class bob.

Class john:
Function getitem:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A4848
function name:  GetItem
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_OBJ_R                                      ~0      'myitem'
          1        ECHO                                                     ~0
   18     2      > RETURN                                                   null

End of function getitem

Function __contruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A4848
function name:  __contruct
number of ops:  2
compiled vars:  !0 = $myitem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 25
    7     1      > RETURN                                                   null

End of function __contruct

End of class john.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.43 ms | 1394 KiB | 13 Q