3v4l.org

run code in 500+ PHP versions simultaneously
<?php // (1) namespace X; // (2) function f(array $o) { return [&$o['v']]; } $v = ['z', 'a']; $a = ['v' => $v]; $args = f($a); call_user_func_array('sort', $args); // Additionally, if the above 2 lines are replaced by the following // line, the bug never appears. //call_user_func_array('sort', f($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QE9Vf
function name:  (null)
number of ops:  12
compiled vars:  !0 = $v, !1 = $a, !2 = $args
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                       !0, <array>
   12     1        INIT_ARRAY                                           ~4      !0, 'v'
          2        ASSIGN                                                       !1, ~4
   14     3        INIT_NS_FCALL_BY_NAME                                        'X%5Cf'
          4        SEND_VAR_EX                                                  !1
          5        DO_FCALL                                          0  $6      
          6        ASSIGN                                                       !2, $6
   15     7        INIT_NS_FCALL_BY_NAME                                        'X%5Ccall_user_func_array'
          8        SEND_VAL_EX                                                  'sort'
          9        SEND_VAR_EX                                                  !2
         10        DO_FCALL                                          0          
   18    11      > RETURN                                                       1

Function x%5Cf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QE9Vf
function name:  X\f
number of ops:  5
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    8     1        FETCH_DIM_W                                          $1      !0, 'v'
          2        INIT_ARRAY                                           ~2      $1
          3      > RETURN                                                       ~2
    9     4*     > RETURN                                                       null

End of function x%5Cf

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.18 ms | 2204 KiB | 14 Q