3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nums = []; for ($i = 1; $i <= 24; $i++) { $nums[] = $i; } print_r($nums); $days = []; for ($i = 1; $i <= 24; $i++) { $day = array_rand($nums); $days[] = $day; unset($day); } print_r($nums); print_r($days);
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
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 14
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 14
Branch analysis from position: 24
Branch analysis from position: 14
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/eX3nF
function name:  (null)
number of ops:  31
compiled vars:  !0 = $nums, !1 = $i, !2 = $days, !3 = $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                                                    ~8, ->3
    9     8    >   INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   11    11        ASSIGN                                                   !2, <array>
   12    12        ASSIGN                                                   !1, 1
         13      > JMP                                                      ->22
   13    14    >   INIT_FCALL                                               'array_rand'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !3, $12
   14    18        ASSIGN_DIM                                               !2
         19        OP_DATA                                                  !3
   15    20        UNSET_CV                                                 !3
   12    21        PRE_INC                                                  !1
         22    >   IS_SMALLER_OR_EQUAL                                      !1, 24
         23      > JMPNZ                                                    ~16, ->14
   18    24    >   INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
   19    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.22 ms | 1396 KiB | 17 Q