3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo($arr) { $arr = [$arr]; $arr['x'] = 5; print_r(func_get_args()); } foo([]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gSHDb
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                                   'foo'
          1        SEND_VAL                                                     <array>
          2        DO_FCALL                                          0          
          3      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gSHDb
function name:  foo
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        INIT_ARRAY                                           ~1      !0
          2        ASSIGN                                                       !0, ~1
    5     3        ASSIGN_DIM                                                   !0, 'x'
          4        OP_DATA                                                      5
    6     5        INIT_FCALL                                                   'print_r'
          6        FUNC_GET_ARGS                                        ~4      
          7        SEND_VAL                                                     ~4
          8        DO_ICALL                                                     
    7     9      > RETURN                                                       null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
182.07 ms | 1465 KiB | 15 Q