3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public function getb () { return b(); } } class b extends a { public function print () { echo 123; } } $a = new a; $b = $a->getb(); $b->print();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7XoYP
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        INIT_METHOD_CALL                                         !0, 'getb'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   16     6        INIT_METHOD_CALL                                         !1, 'print'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class a:
Function getb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7XoYP
function name:  getb
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'b'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    5     3*     > RETURN                                                   null

End of function getb

End of class a.

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

End of function print

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

End of function getb

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.45 ms | 1395 KiB | 13 Q