3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = 1468396800; $arr = []; for ($i = 0; $i < 363; $i++) { $start = $start + 86400; if (date('N', $start) >= 6) continue; $arr[$start] = rand(2,10); } var_dump(json_encode($arr));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 4
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 4
Branch analysis from position: 22
Branch analysis from position: 4
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 4
Branch analysis from position: 22
Branch analysis from position: 4
filename:       /in/QaiKi
function name:  (null)
number of ops:  29
compiled vars:  !0 = $start, !1 = $arr, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1468396800
    5     1        ASSIGN                                                   !1, <array>
    7     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->20
    8     4    >   ADD                                              ~6      !0, 86400
          5        ASSIGN                                                   !0, ~6
    9     6        INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'N'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $8      
         10        IS_SMALLER_OR_EQUAL                                      6, $8
         11      > JMPZ                                                     ~9, ->13
         12    > > JMP                                                      ->19
   10    13    >   INIT_FCALL                                               'rand'
         14        SEND_VAL                                                 2
         15        SEND_VAL                                                 10
         16        DO_ICALL                                         $11     
         17        ASSIGN_DIM                                               !1, !0
         18        OP_DATA                                                  $11
    7    19    >   PRE_INC                                                  !2
         20    >   IS_SMALLER                                               !2, 363
         21      > JMPNZ                                                    ~13, ->4
   13    22    >   INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'json_encode'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $14     
         26        SEND_VAR                                                 $14
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.35 ms | 1388 KiB | 21 Q