3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ContentHelper extends Concrete5_Helper_Content { public function test() { return 'overridden'; } } class Concrete5_Helper_Content { public function test() { return 'base'; } public function callTest() { call_user_func(array($this, 'test')); } } $ch = new ContentHelper(); var_dump($ch->callTest());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdmiG
function name:  (null)
number of ops:  10
compiled vars:  !0 = $ch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'contenthelper', 'concrete5_helper_content'
   16     1        NEW                                              $1      'ContentHelper'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   17     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'callTest'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function test

End of class ContentHelper.

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

End of function test

Function calltest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdmiG
function name:  callTest
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_THIS                                       ~0      
          1        INIT_ARRAY                                       ~1      ~0
          2        ADD_ARRAY_ELEMENT                                ~1      'test'
          3        INIT_USER_CALL                                0          'call_user_func', ~1
          4        DO_FCALL                                      0          
   14     5      > RETURN                                                   null

End of function calltest

End of class Concrete5_Helper_Content.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.73 ms | 1388 KiB | 15 Q