3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function vargs() { $args = func_get_args(); print_r($args); } } class B extends A { public function vargs() { $args = func_get_args(); // call_user_func_array(array('parent', 'vargs'), $args); 5.3 - 5.5 call_user_func_array(array($this, 'parent::vargs'), $args); } } $b = new B; $b->vargs(1, 2, 3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g9SFP
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'vargs'
          4        SEND_VAL_EX                                              1
          5        SEND_VAL_EX                                              2
          6        SEND_VAL_EX                                              3
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class A:
Function vargs:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g9SFP
function name:  vargs
number of ops:  6
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
    8     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    9     5      > RETURN                                                   null

End of function vargs

End of class A.

Class B:
Function vargs:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g9SFP
function name:  vargs
number of ops:  10
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
   18     2        FETCH_THIS                                       ~3      
          3        INIT_ARRAY                                       ~4      ~3
          4        ADD_ARRAY_ELEMENT                                ~4      'parent%3A%3Avargs'
          5        INIT_USER_CALL                                0          'call_user_func_array', ~4
          6        SEND_ARRAY                                               !0
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      0          
   19     9      > RETURN                                                   null

End of function vargs

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.14 ms | 1396 KiB | 15 Q