3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1,2,3,4,5,6,7,8,9,10]; $start = microtime(true); print_r(array_rand($arr,7)); echo microtime(true)-$start;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uvumt
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr, !1 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    5     5        INIT_FCALL                                               'print_r'
          6        INIT_FCALL                                               'array_rand'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 7
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $7      
         15        SUB                                              ~8      $7, !1
         16        ECHO                                                     ~8
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.18 ms | 1011 KiB | 16 Q