3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface I { function foo(int $i); } class X implements I { function foo(int $x) { echo $x; } } (new X)->foo(x: 1); (new X)->foo(i: 1); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k3Rhl
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                                'x'
    7     1        NEW                                                  $0      'X'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'foo'
          4        SEND_VAL_EX                                                  1, 'x'
          5        CHECK_UNDEF_ARGS                                             
          6        DO_FCALL                                          1          
    8     7        NEW                                                  $3      'X'
          8        DO_FCALL                                          0          
          9        INIT_METHOD_CALL                                             $3, 'foo'
         10        SEND_VAL_EX                                                  1, 'i'
         11        CHECK_UNDEF_ARGS                                             
         12        DO_FCALL                                          1          
   10    13      > RETURN                                                       1

Class I:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k3Rhl
function name:  foo
number of ops:  2
compiled vars:  !0 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function foo

End of class I.

Class X:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k3Rhl
function name:  foo
number of ops:  3
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        ECHO                                                         !0
          2      > RETURN                                                       null

End of function foo

End of class X.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.85 ms | 1481 KiB | 13 Q