3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { public function api() { } } class b extends a { public function api() { $argv = func_get_args(); return call_user_func_array( array( 'a', 'api' ), $argv ); } } $b = new b(); $b->api();
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/2qk45
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
   8     1        NOP                                                      
         2        NOP                                                      
  15     3        NEW                                              $4      :-4
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $4
  16     6        INIT_METHOD_CALL                                         !0, 'api'
         7        DO_FCALL                                      0          
         8      > RETURN                                                   1

Class a:
Function api:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/2qk45
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
Jump found. Position 1 = -2
filename:       /in/2qk45
function name:  api
number of ops:  8
compiled vars:  !0 = $argv
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  10     0  E >   INIT_FCALL                                               'func_get_args'
         1        DO_ICALL                                         $1      
         2        ASSIGN                                                   !0, $1
  11     3        INIT_USER_CALL                                0          'call_user_func_array', <array>
         4        UNKNOWN                                                  !0
         5        DO_FCALL                                      0  $3      
         6      > RETURN                                                   $3
  12     7*     > RETURN                                                   null

End of function api

End of class b.

Generated using Vulcan Logic Dumper, using php 7.2.0