3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(0=>'a',1=>'b',2=>'c',3=>'d'); while(list($k, $v) = each($a)){ echo $k.'-'.$v; } shuffle_assoc($a); print_r($a); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
Branch analysis from position: 2
filename:       /in/VceLs
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $k, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->5
    5     2    >   CONCAT                                           ~4      !1, '-'
          3        CONCAT                                           ~5      ~4, !2
          4        ECHO                                                     ~5
    4     5    >   INIT_FCALL_BY_NAME                                       'each'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $6      
          8        FETCH_LIST_R                                     $7      $6, 0
          9        ASSIGN                                                   !1, $7
         10        FETCH_LIST_R                                     $9      $6, 1
         11        ASSIGN                                                   !2, $9
         12      > JMPNZ                                                    $6, ->2
    8    13    >   INIT_FCALL_BY_NAME                                       'shuffle_assoc'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
   10    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
   12    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.76 ms | 1395 KiB | 15 Q