3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format(& $collection, $k, $v) { $collection[$k] = $v; } $collection = array('a' => 1, 'b' => 2, 'c' => 3); call_user_func_array('format', array($collection, 'prefix', 'ass')); var_dump($collection);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qFrXP
function name:  (null)
number of ops:  12
compiled vars:  !0 = $collection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'format'
          2        INIT_ARRAY                                       ~2      !0
          3        ADD_ARRAY_ELEMENT                                ~2      'prefix'
          4        ADD_ARRAY_ELEMENT                                ~2      'ass'
          5        SEND_ARRAY                                               ~2
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0          
    7     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function format:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qFrXP
function name:  format
number of ops:  6
compiled vars:  !0 = $collection, !1 = $k, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    3     3        ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  !2
    4     5      > RETURN                                                   null

End of function format

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.16 ms | 1397 KiB | 16 Q