3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); class Dvach { protected string $dvachProp1 = 'ru'; public function printAllProtectedProperties (): void { $props = get_object_vars($this); foreach (array_keys($props) as $prop) { echo $this->{$prop} . "\n"; } } } class Sosach extends Dvach { protected string $sosachProp1 = 'so'; } class Harkach extends Sosach { protected string $harkachProp1 = 'hk'; } $o = new Harkach(); $o->printAllProtectedProperties();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/am7LT
function name:  (null)
number of ops:  6
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   NEW                                                  $1      'Harkach'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   23     3        INIT_METHOD_CALL                                             !0, 'printAllProtectedProperties'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class Dvach:
Function printallprotectedproperties:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/am7LT
function name:  printAllProtectedProperties
number of ops:  16
compiled vars:  !0 = $props, !1 = $prop
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'get_object_vars'
          1        FETCH_THIS                                           ~2      
          2        SEND_VAL                                                     ~2
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !0, $3
    8     5        INIT_FCALL                                                   'array_keys'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $5      
          8      > FE_RESET_R                                           $6      $5, ->14
          9    > > FE_FETCH_R                                                   $6, !1, ->14
    9    10    >   FETCH_OBJ_R                                          ~7      !1
         11        CONCAT                                               ~8      ~7, '%0A'
         12        ECHO                                                         ~8
    8    13      > JMP                                                          ->9
         14    >   FE_FREE                                                      $6
   11    15      > RETURN                                                       null

End of function printallprotectedproperties

End of class Dvach.

Class Sosach:
Function printallprotectedproperties:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/am7LT
function name:  printAllProtectedProperties
number of ops:  16
compiled vars:  !0 = $props, !1 = $prop
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'get_object_vars'
          1        FETCH_THIS                                           ~2      
          2        SEND_VAL                                                     ~2
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !0, $3
    8     5        INIT_FCALL                                                   'array_keys'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $5      
          8      > FE_RESET_R                                           $6      $5, ->14
          9    > > FE_FETCH_R                                                   $6, !1, ->14
    9    10    >   FETCH_OBJ_R                                          ~7      !1
         11        CONCAT                                               ~8      ~7, '%0A'
         12        ECHO                                                         ~8
    8    13      > JMP                                                          ->9
         14    >   FE_FREE                                                      $6
   11    15      > RETURN                                                       null

End of function printallprotectedproperties

End of class Sosach.

Class Harkach:
Function printallprotectedproperties:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/am7LT
function name:  printAllProtectedProperties
number of ops:  16
compiled vars:  !0 = $props, !1 = $prop
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'get_object_vars'
          1        FETCH_THIS                                           ~2      
          2        SEND_VAL                                                     ~2
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !0, $3
    8     5        INIT_FCALL                                                   'array_keys'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $5      
          8      > FE_RESET_R                                           $6      $5, ->14
          9    > > FE_FETCH_R                                                   $6, !1, ->14
    9    10    >   FETCH_OBJ_R                                          ~7      !1
         11        CONCAT                                               ~8      ~7, '%0A'
         12        ECHO                                                         ~8
    8    13      > JMP                                                          ->9
         14    >   FE_FREE                                                      $6
   11    15      > RETURN                                                       null

End of function printallprotectedproperties

End of class Harkach.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.74 ms | 1590 KiB | 15 Q