3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(...$vargs) { var_dump($vargs); } foo(1); foo(vargs: 2); foo(vargs: 3, someothername: 4); foo(a: 5, b: 6, c: 7);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lu2G2
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 1
          2        DO_FCALL                                      0          
    8     3        INIT_FCALL                                               'foo'
          4        SEND_VAL_EX                                              2, 'vargs'
          5        CHECK_UNDEF_ARGS                                         
          6        DO_FCALL                                      1          
    9     7        INIT_FCALL                                               'foo'
          8        SEND_VAL_EX                                              3, 'vargs'
          9        SEND_VAL_EX                                              4, 'someothername'
         10        CHECK_UNDEF_ARGS                                         
         11        DO_FCALL                                      1          
   10    12        INIT_FCALL                                               'foo'
         13        SEND_VAL_EX                                              5, 'a'
         14        SEND_VAL_EX                                              6, 'b'
         15        SEND_VAL_EX                                              7, 'c'
         16        CHECK_UNDEF_ARGS                                         
         17        DO_FCALL                                      1          
         18      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lu2G2
function name:  foo
number of ops:  5
compiled vars:  !0 = $vargs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_VARIADIC                                    !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.35 ms | 1004 KiB | 18 Q