3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public function xx(int $a, float $b) { print_r(func_get_args()); } } class B extends A { public function xx(int $rename, float $b) { parent::xx(...func_get_args()); } } $a = new A(); $a->xx(1, 2); $a->xx(a: 1, b: 2); $b = new B(); $b->xx(1, 2); $b->xx(a: 1, b: 2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kgHWf
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $2      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   18     3        INIT_METHOD_CALL                                             !0, 'xx'
          4        SEND_VAL_EX                                                  1
          5        SEND_VAL_EX                                                  2
          6        DO_FCALL                                          0          
   19     7        INIT_METHOD_CALL                                             !0, 'xx'
          8        SEND_VAL_EX                                                  1, 'a'
          9        SEND_VAL_EX                                                  2, 'b'
         10        CHECK_UNDEF_ARGS                                             
         11        DO_FCALL                                          1          
   21    12        NEW                                                  $7      'B'
         13        DO_FCALL                                          0          
         14        ASSIGN                                                       !1, $7
   22    15        INIT_METHOD_CALL                                             !1, 'xx'
         16        SEND_VAL_EX                                                  1
         17        SEND_VAL_EX                                                  2
         18        DO_FCALL                                          0          
   23    19        INIT_METHOD_CALL                                             !1, 'xx'
         20        SEND_VAL_EX                                                  1, 'a'
         21        SEND_VAL_EX                                                  2, 'b'
         22        CHECK_UNDEF_ARGS                                             
         23        DO_FCALL                                          1          
         24      > RETURN                                                       1

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

End of function xx

End of class A.

Class B:
Function xx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kgHWf
function name:  xx
number of ops:  8
compiled vars:  !0 = $rename, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   13     2        INIT_STATIC_METHOD_CALL                                      'xx'
          3        FUNC_GET_ARGS                                        ~2      
          4        SEND_UNPACK                                                  ~2
          5        CHECK_UNDEF_ARGS                                             
          6        DO_FCALL                                          1          
   14     7      > RETURN                                                       null

End of function xx

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.1 ms | 1794 KiB | 14 Q