3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class A { /** * @return A $this */ public function fa() { echo 'AAAAA'.PHP_EOL; return $this; } } class B extends A { /** * @return B $this */ public function fb() { echo 'BBBB'.PHP_EOL; return $this; } } $obj = new B(); $obj->fa() ->fb();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sHdiT
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'fa'
          4        DO_FCALL                                      0  $4      
   28     5        INIT_METHOD_CALL                                         $4, 'fb'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function fa

End of class A.

Class B:
Function fb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sHdiT
function name:  fb
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'BBBB%0A'
   22     1        FETCH_THIS                                       ~0      
          2      > RETURN                                                   ~0
   23     3*     > RETURN                                                   null

End of function fb

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

End of function fa

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.84 ms | 1395 KiB | 13 Q