3v4l.org

run code in 300+ PHP versions simultaneously
<?php class dad { function dad() { // implements some logic } } class child extends dad { function child() { echo "I'm " , get_parent_class($this) , "'s son\n"; } } $foo = new child(); $bar = new child2(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dJga0
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $2      'child'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   19     3        NEW                                              $5      'child2'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   21     6      > RETURN                                                   1

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

End of function dad

End of class dad.

Class child:
Function child:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dJga0
function name:  child
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'I%27m+'
          1        INIT_FCALL                                               'get_parent_class'
          2        FETCH_THIS                                       ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
          6        ECHO                                                     '%27s+son%0A'
   14     7      > RETURN                                                   null

End of function child

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

End of function dad

End of class child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.15 ms | 1395 KiB | 15 Q