3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); class a { public function api() { echo 'hi'; } } 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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YoZfN
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   17     3        NEW                                              $2      'b'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   18     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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YoZfN
function name:  api
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'hi'
    8     1      > 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/YoZfN
function name:  api
number of ops:  8
compiled vars:  !0 = $argv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
   13     2        INIT_USER_CALL                                0          'call_user_func_array', <array>
          3        SEND_ARRAY                                               !0
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      0  $3      
          6      > RETURN                                                   $3
   14     7*     > RETURN                                                   null

End of function api

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.08 ms | 1395 KiB | 15 Q