3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = [ 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5, 'f' => 6, ]; unset($a['b']); $b = [ 'a' => 1, 'c' => 3, 'd' => 4, 'e' => 5, 'f' => 6, ]; srand(1); var_dump(array_rand($a)); srand(1); var_dump(array_rand($b));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g0uNE
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        UNSET_DIM                                                    !0, 'b'
    6     2        ASSIGN                                                       !1, <array>
    8     3        INIT_FCALL                                                   'srand'
          4        SEND_VAL                                                     1
          5        DO_ICALL                                                     
    9     6        INIT_FCALL                                                   'var_dump'
          7        INIT_FCALL                                                   'array_rand'
          8        SEND_VAR                                                     !0
          9        DO_ICALL                                             $5      
         10        SEND_VAR                                                     $5
         11        DO_ICALL                                                     
   11    12        INIT_FCALL                                                   'srand'
         13        SEND_VAL                                                     1
         14        DO_ICALL                                                     
   12    15        INIT_FCALL                                                   'var_dump'
         16        INIT_FCALL                                                   'array_rand'
         17        SEND_VAR                                                     !1
         18        DO_ICALL                                             $8      
         19        SEND_VAR                                                     $8
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
118.55 ms | 508 KiB | 12 Q