3v4l.org

run code in 300+ PHP versions simultaneously
<?php $daysOfWeek = array(0=>'pon',1=>'wt',2=>'sr',3=>'czw',4=>'pt',5=>'sb',6=>'nd'); $converted = array(); foreach ($daysOfWeek as $key=>$checked) { $converted[++$key] = $checked; } $converted[0] = $converted[7]; unset($converted[7]); print_r($converted);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/v1XPR
function name:  (null)
number of ops:  18
compiled vars:  !0 = $daysOfWeek, !1 = $converted, !2 = $checked, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $6      !0, ->9
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->9
          4    >   ASSIGN                                                   !3, ~7
    6     5        PRE_INC                                          ~9      !3
          6        ASSIGN_DIM                                               !1, ~9
          7        OP_DATA                                                  !2
    5     8      > JMP                                                      ->3
          9    >   FE_FREE                                                  $6
    8    10        FETCH_DIM_R                                      ~12     !1, 7
         11        ASSIGN_DIM                                               !1, 0
         12        OP_DATA                                                  ~12
    9    13        UNSET_DIM                                                !1, 7
   11    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.11 ms | 1395 KiB | 15 Q