3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nums = []; for ($i = 1; $i <= 24; $i++) { $nums[] = $i; } $days = []; foreach ($nums as $num) { $day = array_rand($nums); $days[$day] = $day; unset($nums[$day]); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/qoDOr
function name:  (null)
number of ops:  21
compiled vars:  !0 = $nums, !1 = $i, !2 = $days, !3 = $num, !4 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->6
    6     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  !1
    5     5        PRE_INC                                                  !1
          6    >   IS_SMALLER_OR_EQUAL                                      !1, 24
          7      > JMPNZ                                                    ~9, ->3
    9     8    >   ASSIGN                                                   !2, <array>
   10     9      > FE_RESET_R                                       $11     !0, ->19
         10    > > FE_FETCH_R                                               $11, !3, ->19
   11    11    >   INIT_FCALL                                               'array_rand'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !4, $12
   12    15        ASSIGN_DIM                                               !2, !4
         16        OP_DATA                                                  !4
   13    17        UNSET_DIM                                                !0, !4
   10    18      > JMP                                                      ->10
         19    >   FE_FREE                                                  $11
   14    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.88 ms | 1395 KiB | 15 Q