3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.34 ms | 1396 KiB | 15 Q