3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo{ var $x; function foofoo() { $this->x = "foofoo"; return; } } class bar extends foo { function barbar() { parent::foofoo(); echo $this->x; } } $b = new bar; $b->barbar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZaC4F
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'barbar'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class foo:
Function foofoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZaC4F
function name:  foofoo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'x'
          1        OP_DATA                                                  'foofoo'
    6     2      > RETURN                                                   null
    7     3*     > RETURN                                                   null

End of function foofoo

End of class foo.

Class bar:
Function barbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZaC4F
function name:  barbar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'foofoo'
          1        DO_FCALL                                      0          
   13     2        FETCH_OBJ_R                                      ~1      'x'
          3        ECHO                                                     ~1
   14     4      > RETURN                                                   null

End of function barbar

Function foofoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZaC4F
function name:  foofoo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'x'
          1        OP_DATA                                                  'foofoo'
    6     2      > RETURN                                                   null
    7     3*     > RETURN                                                   null

End of function foofoo

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.28 ms | 1399 KiB | 13 Q