3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { private $t = 5; function fooX() { var_dump($this->t); }} class Y extends X { protected $t = 6; function fooY() { var_dump($this->t); } } var_dump(new Y); (new Y)->fooX(); (new Y)->fooY();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5bA2d
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $0      'Y'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
    7     5        NEW                                              $3      'Y'
          6        DO_FCALL                                      0          
          7        INIT_METHOD_CALL                                         $3, 'fooX'
          8        DO_FCALL                                      0          
    8     9        NEW                                              $6      'Y'
         10        DO_FCALL                                      0          
         11        INIT_METHOD_CALL                                         $6, 'fooY'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class X:
Function foox:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5bA2d
function name:  fooX
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      't'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function foox

End of class X.

Class Y:
Function fooy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5bA2d
function name:  fooY
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      't'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function fooy

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

End of function foox

End of class Y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.13 ms | 1396 KiB | 15 Q