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 $a, float $b) { throw new Error('Not allowed'); } } $a = new A(); $a->xx(1, 2); $b = new B(); $b->xx(1, 2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3m7eo
function name:  (null)
number of ops:  15
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          
   20     7        NEW                                                  $6      'B'
          8        DO_FCALL                                          0          
          9        ASSIGN                                                       !1, $6
   21    10        INIT_METHOD_CALL                                             !1, 'xx'
         11        SEND_VAL_EX                                                  1
         12        SEND_VAL_EX                                                  2
         13        DO_FCALL                                          0          
         14      > RETURN                                                       1

Class A:
Function xx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3m7eo
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 = 108) Position 1 = -2
filename:       /in/3m7eo
function name:  xx
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   13     2        NEW                                                  $2      'Error'
          3        SEND_VAL_EX                                                  'Not+allowed'
          4        DO_FCALL                                          0          
          5      > THROW                                             0          $2
   14     6*     > RETURN                                                       null

End of function xx

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.79 ms | 2152 KiB | 14 Q