3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class I { public $a; function show() { echo $this->a; } function seta($v) { $this->a = $v; } } class A extends I { } class B extends I { } $a = new A(); $b = new B(); $a->seta('a'); $b->seta('b'); $a->show(); $b->show();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GVHAT
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        NEW                                              $5      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   25     6        INIT_METHOD_CALL                                         !0, 'seta'
          7        SEND_VAL_EX                                              'a'
          8        DO_FCALL                                      0          
   26     9        INIT_METHOD_CALL                                         !1, 'seta'
         10        SEND_VAL_EX                                              'b'
         11        DO_FCALL                                      0          
   27    12        INIT_METHOD_CALL                                         !0, 'show'
         13        DO_FCALL                                      0          
   28    14        INIT_METHOD_CALL                                         !1, 'show'
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

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

End of function show

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

End of function seta

End of class I.

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

End of function show

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

End of function seta

End of class A.

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

End of function show

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

End of function seta

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.97 ms | 1390 KiB | 13 Q