3v4l.org

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

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

End of function api

End of class a.

Class b:
Function api:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mDB5n
function name:  api
number of ops:  13
compiled vars:  !0 = $argv, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FUNC_GET_ARGS                                    ~2      
          1        ASSIGN                                                   !0, ~2
   11     2        NEW                                              $4      'a'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   12     5        INIT_ARRAY                                       ~7      !1
          6        ADD_ARRAY_ELEMENT                                ~7      'api'
          7        INIT_USER_CALL                                0          'call_user_func_array', ~7
          8        SEND_ARRAY                                               !0
          9        CHECK_UNDEF_ARGS                                         
         10        DO_FCALL                                      0  $8      
         11      > RETURN                                                   $8
   13    12*     > RETURN                                                   null

End of function api

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.71 ms | 1385 KiB | 13 Q