3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Base { protected function doit() { throw new \RuntimeException('Not implemented'); } } class Closed extends Base { protected function doit() { echo 'done!'; } } class Opener extends Base { public function execute(Closed $closed) { $closed->doit(); } } $closed = new Closed(); $opener = new Opener(); $opener->execute($closed);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Q5WD
function name:  (null)
number of ops:  10
compiled vars:  !0 = $closed, !1 = $opener
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $2      'Closed'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   28     3        NEW                                              $5      'Opener'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   31     6        INIT_METHOD_CALL                                         !1, 'execute'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class Base:
Function doit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/0Q5WD
function name:  doit
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'RuntimeException'
          1        SEND_VAL_EX                                              'Not+implemented'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    8     4*     > RETURN                                                   null

End of function doit

End of class Base.

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

End of function doit

End of class Closed.

Class Opener:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Q5WD
function name:  execute
number of ops:  4
compiled vars:  !0 = $closed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        INIT_METHOD_CALL                                         !0, 'doit'
          2        DO_FCALL                                      0          
   24     3      > RETURN                                                   null

End of function execute

Function doit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/0Q5WD
function name:  doit
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'RuntimeException'
          1        SEND_VAL_EX                                              'Not+implemented'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    8     4*     > RETURN                                                   null

End of function doit

End of class Opener.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.85 ms | 1447 KiB | 13 Q