3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExtendClass extends SimpleClass { // Redefine the parent method function displayVar() { echo "Extending class\n"; parent::displayVar(); } } $extended = new ExtendClass(); $extended->displayVar(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dn1l4
function name:  (null)
number of ops:  7
compiled vars:  !0 = $extended
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'extendclass', 'simpleclass'
   12     1        NEW                                              $1      'ExtendClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   13     4        INIT_METHOD_CALL                                         !0, 'displayVar'
          5        DO_FCALL                                      0          
   14     6      > RETURN                                                   1

Class ExtendClass:
Function displayvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dn1l4
function name:  displayVar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Extending+class%0A'
    8     1        INIT_STATIC_METHOD_CALL                                  'displayVar'
          2        DO_FCALL                                      0          
    9     3      > RETURN                                                   null

End of function displayvar

End of class ExtendClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.79 ms | 1393 KiB | 13 Q