3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function printName() { echo 'A'; } } class B extends A { public function printName() { echo 'B'; } } class C extends A { public function printName() { echo 'C'; } } $classes = array( new A(), new B(), new C() ); foreach($classes as $class) { $class->printName() . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/Yo95f
function name:  (null)
number of ops:  19
compiled vars:  !0 = $classes, !1 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
          3        NEW                                              $5      'B'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~4      $5
          6        NEW                                              $7      'C'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~4      $7
   24     9        ASSIGN                                                   !0, ~4
   28    10      > FE_RESET_R                                       $10     !0, ->17
         11    > > FE_FETCH_R                                               $10, !1, ->17
   29    12    >   INIT_METHOD_CALL                                         !1, 'printName'
         13        DO_FCALL                                      0  $11     
         14        CONCAT                                           ~12     $11, '%0A'
         15        FREE                                                     ~12
   28    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $10
   30    18      > RETURN                                                   1

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

End of function printname

End of class A.

Class B:
Function printname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yo95f
function name:  printName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'B'
   14     1      > RETURN                                                   null

End of function printname

End of class B.

Class C:
Function printname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yo95f
function name:  printName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     'C'
   21     1      > RETURN                                                   null

End of function printname

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.59 ms | 1386 KiB | 13 Q