3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $protected1 = 'protected1'; public function test1() { var_dump($this->protected1); var_dump($this->protected2); } } class Bar extends Foo { protected $protected2 = 'protected2'; public function test2() { var_dump($this->protected1); var_dump($this->protected2); } } (new Bar)->test1(); (new Bar)->test2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2Nu0
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $0      'Bar'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'test1'
          3        DO_FCALL                                      0          
   26     4        NEW                                              $3      'Bar'
          5        DO_FCALL                                      0          
          6        INIT_METHOD_CALL                                         $3, 'test2'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Foo:
Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2Nu0
function name:  test1
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'protected1'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   10     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~2      'protected2'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function test1

End of class Foo.

Class Bar:
Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2Nu0
function name:  test2
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'protected1'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   21     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~2      'protected2'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   22     8      > RETURN                                                   null

End of function test2

Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H2Nu0
function name:  test1
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'protected1'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   10     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~2      'protected2'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function test1

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.23 ms | 1005 KiB | 14 Q