3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data['slider'] = [1,2,3,4,5,6,7,8,9]; //remove 3 first elements from main array $first = array_slice($data['slider'], 0, 3); //shuffle 3 elements shuffle($first); //replace old first three $data['slider'] = array_replace($data['slider'], $first); var_export($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rYfV2
function name:  (null)
number of ops:  23
compiled vars:  !0 = $data, !1 = $first
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                                   !0, 'slider'
          1        OP_DATA                                                      <array>
    4     2        INIT_FCALL                                                   'array_slice'
          3        FETCH_DIM_R                                          ~3      !0, 'slider'
          4        SEND_VAL                                                     ~3
          5        SEND_VAL                                                     0
          6        SEND_VAL                                                     3
          7        DO_ICALL                                             $4      
          8        ASSIGN                                                       !1, $4
    6     9        INIT_FCALL                                                   'shuffle'
         10        SEND_REF                                                     !1
         11        DO_ICALL                                                     
    8    12        INIT_FCALL                                                   'array_replace'
         13        FETCH_DIM_R                                          ~8      !0, 'slider'
         14        SEND_VAL                                                     ~8
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                             $9      
         17        ASSIGN_DIM                                                   !0, 'slider'
         18        OP_DATA                                                      $9
    9    19        INIT_FCALL                                                   'var_export'
         20        SEND_VAR                                                     !0
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.73 ms | 1373 KiB | 17 Q