3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number_to_get = 2; $names = array("Maria", "Jan", "Elton", "Wiktor"); shuffle($names); $picks = array_slice($names, 0, $number_to_get); var_dump($picks);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YdXm6
function name:  (null)
number of ops:  15
compiled vars:  !0 = $number_to_get, !1 = $names, !2 = $picks
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'shuffle'
          3        SEND_REF                                                 !1
          4        DO_ICALL                                                 
    6     5        INIT_FCALL                                               'array_slice'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 0
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    7    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.27 ms | 1394 KiB | 19 Q