3v4l.org

run code in 300+ PHP versions simultaneously
<?php class nodeGroup { public function test() { echo "internal\n"; } public function somethingElse() { echo "somethingElse\n"; } } $a = new class extends nodeGroup { public function test() { echo "extended\n"; } }; $a->test(); $a->somethingElse();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/puNOB
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_ANON_CLASS                               <unknown> 'nodegroup'
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   23     4        INIT_METHOD_CALL                                         !0, 'test'
          5        DO_FCALL                                      0          
   24     6        INIT_METHOD_CALL                                         !0, 'somethingElse'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function test

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

End of function somethingelse

End of class nodeGroup.

Class nodeGroup@anonymous:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/puNOB
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     'extended%0A'
   20     1      > RETURN                                                   null

End of function test

End of class nodeGroup@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.3 ms | 1002 KiB | 13 Q