3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $randomize = array_slice($input,0,3); $keep_safe = array_slice($input,3); shuffle($randomize); print_r(array_merge($randomize,$keep_safe));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HVMc8
function name:  (null)
number of ops:  23
compiled vars:  !0 = $input, !1 = $randomize, !2 = $keep_safe
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_slice'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 3
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    6     7        INIT_FCALL                                               'array_slice'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 3
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !2, $6
    7    12        INIT_FCALL                                               'shuffle'
         13        SEND_REF                                                 !1
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'print_r'
         16        INIT_FCALL                                               'array_merge'
         17        SEND_VAR                                                 !1
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.59 ms | 1002 KiB | 17 Q