3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 0 => 'Sun', 1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri', 6 => 'Sat' ]; $start = 0; $r1 = $r2 = []; foreach($a as $k => $v){ ($k >= $start) ? ($r1[$k]=$v) : ($r2[$k]=$v); } $r = $r1 + $r2; print_r($r);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/1KDoR
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $start, !2 = $r1, !3 = $r2, !4 = $v, !5 = $k, !6 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 0
   13     2        ASSIGN                                           ~9      !3, <array>
          3        ASSIGN                                                   !2, ~9
   14     4      > FE_RESET_R                                       $11     !0, ->18
          5    > > FE_FETCH_R                                       ~12     $11, !4, ->18
          6    >   ASSIGN                                                   !5, ~12
   15     7        IS_SMALLER_OR_EQUAL                                      !1, !5
          8      > JMPZ                                                     ~14, ->13
          9    >   ASSIGN_DIM                                       ~15     !2, !5
         10        OP_DATA                                                  !4
         11        QM_ASSIGN                                        ~16     ~15
         12      > JMP                                                      ->16
         13    >   ASSIGN_DIM                                       ~17     !3, !5
         14        OP_DATA                                                  !4
         15        QM_ASSIGN                                        ~16     ~17
         16    >   FREE                                                     ~16
   14    17      > JMP                                                      ->5
         18    >   FE_FREE                                                  $11
   17    19        ADD                                              ~18     !2, !3
         20        ASSIGN                                                   !6, ~18
   18    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !6
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.66 ms | 1401 KiB | 15 Q