3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class A { protected $a = 'AAA'; private $b = 'BBB'; public function printB() { echo $this->b.PHP_EOL; } } class B extends A { public function printB2() { echo $this->b.PHP_EOL; } public function printA() { echo $this->a.PHP_EOL; } } $obj = new B; $obj->printA(); $obj->printB(); $obj->printB2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gA92u
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'printA'
          4        DO_FCALL                                      0          
   17     5        INIT_METHOD_CALL                                         !0, 'printB'
          6        DO_FCALL                                      0          
   18     7        INIT_METHOD_CALL                                         !0, 'printB2'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function printb

End of class A.

Class B:
Function printb2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gA92u
function name:  printB2
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'b'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
          3      > RETURN                                                   null

End of function printb2

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

End of function printa

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

End of function printb

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151 ms | 1399 KiB | 13 Q