3v4l.org

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

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.91 ms | 1398 KiB | 19 Q