3v4l.org

run code in 500+ PHP versions simultaneously
<?php class SkipProtectedPropertyOnNonFinalClass { protected int $value = 5; public function __construct(int $value) { $this->value = $value; } public function getValue() { return $this->value; } } class SomeChild extends SkipProtectedPropertyOnNonFinalClass { public function __construct() { } } $obj = new SomeChild(); echo $obj->getValue();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNpBG
function name:  (null)
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   25     0  E >   NEW                                                  $1      'SomeChild'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   26     3        INIT_METHOD_CALL                                             !0, 'getValue'
          4        DO_FCALL                                          0  $4      
          5        ECHO                                                         $4
          6      > RETURN                                                       1

Class SkipProtectedPropertyOnNonFinalClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNpBG
function name:  __construct
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    9     1        ASSIGN_OBJ                                                   'value'
          2        OP_DATA                                                      !0
   10     3      > RETURN                                                       null

End of function __construct

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

End of function getvalue

End of class SkipProtectedPropertyOnNonFinalClass.

Class SomeChild:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PNpBG
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                       null

End of function __construct

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

End of function getvalue

End of class SomeChild.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.74 ms | 1180 KiB | 13 Q